New Error with Outlook 2013: We can't complete this because we can't contact the server right now. Please try again later. RRS feed

  • Question

  • I have inherited an Outlook add-in that our company has been using for years (and it's been a long time since I did much programming, so please bear with me!).

    Our add-in includes a treeview control, which iterates through folders in order to display a representation similar to the folder browser in Outlook.  It works fine in Outlook 2010, but in Outlook 2013 it fails when trying to build the tree for Public Folders.

    The error is this:  "We can't complete this because we can't contact the server right now. Please try again later."

    I also sometimes get this:  "The operation failed because of a registry or installation problem. Restart Outlook and try again. If the problem persists, reinstall."  (but I suspect that the first error is more the crux)

    Here's the line where the error occurs:

            _Items.Add(new OutlookFolder(this, folder));

    Where _Items = ICollection<OutlookFolder>

    And OutlookFolder is defined thusly:

            public OutlookFolder(OutlookFolder parent, Outlook.MAPIFolder folder)
                this.Parent = parent;    [OutlookFolder]
                this.Name = folder.Name;    [String]
                this.Path = folder.FolderPath;    [String]
                _Folder = folder;    [Outlook.MAPIFolder]
                _HasFolder = true;    [bool]

    When debugging, immediately prior to execution of the 'Add' line above I can see folder.Name, so I know it's getting public folder data, it just blows up on that line for some reason.

    I don't know if that's enough to give anyone insight, but Ithought I'd ask just in case someone is familiar enough with changes in Outlook that they might be able to point me in the right direction.


    Monday, January 7, 2013 4:08 AM

All replies

  • please determine on exactly which line it blows up (using debugging). When exactly do you invoke this code? on which outlook event?
    Monday, January 7, 2013 8:49 AM
  • Damian,

    Thanks for your prompt reply.  This morning I realized that even in the Outlook 2013 browser I couldn't open the first of the folders.  It was an unused calendar, so we justed deleted it and our add-in encountered no further problems.  I don't know what 2013 didn't like about that particular folder, but from a development standpoint I guess it was just bad luck that it was the very first public folder, since I wasted a bunch of time before discovering that it was the folder itself that was apprarently the problem.

    At any rate, thanks for your willingness to try to help.


    Monday, January 7, 2013 7:19 PM
  • Hi JoelB2,

    Thanks for posting in the MSDN Forum.

    I will involve some experts into your thread to see whether they can help you out. There might be some time delay, appreciate for your patience.

    Have a good day,


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 10, 2013 5:45 AM
  • Hi Joel,

    Please let me know if you need any further help on this issue. If yes, could you please share the code that you are using along with the details of the exact error that you are getting?


    Shailesh G. Rajput
    Microsoft Developer Support - Messaging & Collaboration

    Thursday, January 31, 2013 12:47 AM
  • I am having the same problem and but all my folders are working fine.  Please help


    Gary Lemmons

    Saturday, June 1, 2013 8:02 PM
  • It is perfectly legal to have folders in the PF store to which the current user has no access.

    Even then, errors are inevitable and must be handled.

    But most importantly, it is a bad idea to load all folders at once. Do what Outlook does - load only the visible set of folders (e.g. all the immediate children of the root folder of the default store). If a folder has subfolders (read the PR_SUBFOLDERS property using MAPIFolder.PropertyAccessor, the DASL name is, create a dummy tree node. When (and if) the folder is expanded, add the immediate children of that folder and remove the dummy node.

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Saturday, June 1, 2013 10:48 PM