Showing Pop up message if error occured while creating folder [Windows Store Javascript App] RRS feed

  • Question

  • I am trying to show a pop up error message to user if folder creation fails because it already exists, but access Denied exception is thrown on msg.showAsync()

    sf.getFolderAsync(KorN_Name).then(function (kn) {
        return kn.createFolderAsync(username, Windows.Storage.CreationCollisionOption.failIfExists)
    }).done(function (user) {
          //some code
            function (error) {
                    var md = Windows.UI.Popups.MessageDialog;
                    var msg = new md("User already exists", "Ooops!");
    How to fix it?
    Sunday, July 28, 2013 6:24 AM


  • Hi,

    The "access denied" error appears when you have a dialog already on screen (in this case the getFolderAsync one) and you try to open another.

    I would try the following on your error handler:

    function (error) {
                    var msg = new Windows.UI.Popups.MessageDialog("User already exists", "Ooops!");
                        return msg.showAsync();

    Monday, July 29, 2013 2:08 PM