none
[E2013][PS][C#][EWS] since Exchange 2013 CU1 InternalServerError with SyncFolderitems on public folders which have more than 6 items in it. RRS feed

  • Question

  • Since I have installed the CU1 to the Exchange 2013 I get an Internal Server Error with the Managed Exchange API 2.0 if i try to use the SyncFolderItems function against a public folder.

    I know, this was working with exact the same code before I have installed the CU1.

    The problem comes up only if I have more than 6 items in the folder. I have tested with a contact and mailfolder. We can see the problem also on one of my customers Exchange Servers, he has also the CU1.

    See this code to reproduce the error (Exchange "2" with a really existing public folder ):

    The code will run trough all public Exchange folders and if it finds a folder named "2" it will use the function SyncFolderItems against that folder, the code is not sencefull but it will show the error if you have more then 6 items in it.

    Import-Module -Name "C:\Program Files (x86)\Microsoft\Exchange\Web Services\2.0\Microsoft.Exchange.WebServices.dll"
    $ews = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService -ArgumentList "Exchange2013"
    $cred = (Get-Credential).GetNetworkCredential()
    function EnumFolders($folderidcnt)
    {  
       $fiResult = $ews.FindFolders($folderidcnt,$null,$fvFolderView)  
        
    	foreach($ffFolder in $fiResult.Folders)
    	{  
    		if($ffFolder.DisplayName -eq "2")
    		{
    			   "Found:"+$ffFolder.DisplayName
    			   "ID:"+$ffFolder.Id
    			   $changes = $ews.SyncFolderItems($ffFolder.Id,[Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties,$null,512,[Microsoft.Exchange.WebServices.Data.SyncFolderItemsScope]::NormalItems,"")
    			   "Changes In Folder:" + $changes.Count
    			   foreach($change in $changes)
    			   {
    			      "-"+$change.Item.Subject
    			   }
    		}
    		"- Folder:"+ $ffFolder.DisplayName;
    		EnumFolders($ffFolder.Id);
    	}
    	
    } 
    $ews.Credentials = New-Object System.Net.NetworkCredential -ArgumentList $cred.UserName, $cred.Password, $cred.Domain
    $ews.Url= "https://srv2012/EWS/Exchange.asmx"
    $folderidcnt = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::PublicFoldersRoot,$null)
    $fvFolderView =  New-Object Microsoft.Exchange.WebServices.Data.FolderView(1000)  
    $psPropertySet = new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)  
    $fvFolderView.PropertySet = $psPropertySet;  
    $fiResult = $null  
    do {  
        EnumFolders($folderidcnt);
    	
    }while($fiResult.MoreAvailable -eq $true)  

    ScriptOutput
    I have activated the tracelog in IIS. Here is some output from it.

    TraceLog




    • Edited by Somebytes Thursday, June 20, 2013 3:49 PM Make it interesting, because nobody answers
    Wednesday, June 19, 2013 6:44 AM

Answers

  • Hello,

    I have just tested with the new CU3. This problem seems to be fixed now.

    BR

    Sven


    • Edited by Somebytes Wednesday, November 27, 2013 6:47 PM
    • Marked as answer by Somebytes Wednesday, November 27, 2013 7:29 PM
    Wednesday, November 27, 2013 6:47 PM

All replies

  • I have removed all the public folders and made a new database + mailbox for the public folders and created the public folders again. I got the same problem. 

    After I went back to the screenshot, where the CU1 was not installed, it was working, so I am now really sure that this must be a E2013 CU1 bug. Can somebody confirm this?

    Thursday, June 20, 2013 6:08 PM
  • I can confirm.

    We're using EWS to open public folders. Testing on a Folder with ~3 Elements of Test Data everything worked fine. But as soon as we selected the Production Folders we get the exact same error message.

    Thanks for your post, it saved me tons of work in deleting folders, recreating, etc.

    Seems to be a interesting bug in CU1.

    Thursday, July 11, 2013 2:11 PM
  • I can confirm.

    We're using EWS to open public folders. Testing on a Folder with ~3 Elements of Test Data everything worked fine. But as soon as we selected the Production Folders we get the exact same error message.

    Thanks for your post, it saved me tons of work in deleting folders, recreating, etc.

    Seems to be a interesting bug in CU1.


    The bug also exists in CU2, Microsoft knows about it, because I have opened a support ticket. Hopefully they come out with a HotFix or anything else.  
    Friday, July 26, 2013 12:37 PM
  • Update:

    - After update to CU2 Version 2 (15.0.712.24) I get the same error.

    - I also noticed the same thing in my Office365 account.

    Wednesday, August 28, 2013 2:38 PM
  • Same problem for me too.  (CU2)

    Has anyone found a hotfix?

    Tuesday, October 1, 2013 1:13 AM
  • The following link seems to indicate that CU3 might be available around October 9th (since they claim new updates every 3 months and CU2 was July 9th).

    http://technet.microsoft.com/en-us/library/jj907309(v=exchg.150).aspx

    Tuesday, October 1, 2013 1:22 AM
  • Hello,

    I have just tested with the new CU3. This problem seems to be fixed now.

    BR

    Sven


    • Edited by Somebytes Wednesday, November 27, 2013 6:47 PM
    • Marked as answer by Somebytes Wednesday, November 27, 2013 7:29 PM
    Wednesday, November 27, 2013 6:47 PM