Exchange Server 2010 Support for folder versions for asp.net

I am trying to sync with swap folders trying below command to find all folders in asp.net c #.

view.Traversal = FolderTraversal.Deep;

        FindFoldersResults findFolderResults = service.FindFolders(new FolderId(WellKnownFolderName.Root, mailbox), view);

      

However, this command, previously working on another mail server, 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 that both exchange servers are exchange 2010, so does anyone know what the problem really is? or exactly what causes the command to be unsupported.

The successful run server is version 14.03.0195.001
The failed server version is         14.00.0722.000

      

Is this error the cause of this minor error? I mean both are Exchange 2010 server, shouldn't the commands be the same?

+3


source to share


1 answer


Try to instantiate the ExchangeService object using ExchangeVersion.Exchange2010

. (Also available ExchangeVersions

for SP1 and SP2.) I don't know the 14.xyz numbers on each, but obviously the failed server is downstairs from the production server. EWS is not complaining about the feature you want, but rather the version you are requesting. So, if the fail-safe server was running E2010 SP1, and your EWS DLL was on Exchange2010_SP2 by default, things didn't work. You can probably safely ditch the E2010 RTM flavor unless other parts of your code need something specific in SP1 or SP2, in which case you'll need to pinpoint exactly what the 14.xyz number is.



+6


source







All Articles