I am trying to sync to an exchange folders by trying to run the below command to find all the folders in asp.net c#.
view.Traversal = FolderTraversal.Deep;
FindFoldersResults findFolderResults = service.FindFolders(new FolderId(WellKnownFolderName.Root, mailbox), view);
However this command previously worked on another mail server have failed for the current one I am using. The error returned on this line is
Microsoft.Exchange.WebServices.Data.ServiceVersionException: Exchange Server doesn't support the requested version.
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ProcessWebException(WebException webException)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
at Microsoft.Exchange.WebServices.Data.SimpleServiceRequestBase.InternalExecute()
at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
at Microsoft.Exchange.WebServices.Data.ExchangeService.InternalFindFolders(IEnumerable`1 parentFolderIds, SearchFilter searchFilter, FolderView view, ServiceErrorHandling errorHandlingMode)
at Microsoft.Exchange.WebServices.Data.ExchangeService.FindFolders(FolderId parentFolderId, FolderView view)
The funny thing is both of exchange server are exchange 2010 so anyone have any idea what problem this really is? or exactly what is causing the command not supported.
The successful run server is version 14.03.0195.001
The failed server version is 14.00.0722.000
Is this error really caused by this Minor error? I mean both of them are exchange 2010 server really shouldn't the commands be the same?