Get CASVersion of exchange server for a user in exchange 2007

Hi,

I am trying to Get the CASVersion of a target user's mail box.

The Exchange 2007 Server has its Auto discover in POX and i am using EWS Managed API

Below is the Code:

 AutodiscoverService autoService = new AutodiscoverService(ExchangeVersion.Exchange2007_SP1);
autoService.Credentials = //Provided the credential;

autoService.Url = new Uri("https://mydomain/autodiscover/autodiscover.xml");

GetUserSettingsResponse userResponse = autoService.GetUserSettings("user@mydomain", UserSettingName.CasVersion);

Error:

"An element node 'soap:Envelope' of the type Element was expected, but node 'Autodiscover' of type Element was found.

July 16th, 2015 8:04am

That's only supported on Exchange 2010 and greater, on 2007 to get the server version need to make at least one EWS request (set the request version to 2007)  and then check the server version in the response that comes back see https://msdn.microsoft.com/en-us/library/office/dd633705(v=exchg.80).aspx this will reflect the actualy version sp/rollup the server is running.

Cheers
Glen

 
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 10:43pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics