Exchange Server TechCenter >
Exchange Server Forums
>
Development
>
Autodiscover the Exchange version (managed API)?
Autodiscover the Exchange version (managed API)?
- I work in an environment that has some users in Exchange 2007 and others in Exchange 2010. (All of the autodiscover requests appear to be served by 2010). Is there a graceful way to use autodiscovery to determine which exchange server version to use for a particular user? I can use autodiscovery to get the EWS Url for the server, but I can't find anything in the autodiscovered information that indicates which exchange server version it is. (Managed API)
-jeff
All Replies
- You can use AutodiscoverService and its GetUserSettings method to retrieve the EwsSupportedSchemas setting. Note that AutodiscoverService will only talk to an Exchange 2010 Autodiscover service. If this becomes a problem, you can also try calling say Folder.Bind(service, WellKnownFolder.Inbox) with a service setup for Exchange 2010, and if it fails fall back to using a service targeted to Exchange 2007 SP1.
David Claux | Program Manager - Exchange Web Services- Proposed As Answer byDavid Claux - MSFT Saturday, November 07, 2009 2:44 AM
- I tried using AutodiscoverService and GetUserSettings but (correct me if I'm wrong) the EwsSupportedSchemas does not return the supported schemas for the user's *exchange* service, it seems to return the supported schemas for the *autodiscover* service that is called.
So it seems the two remaining options are:
1) Just specify 2007 regardless of the actual exchange service. This works if we don't need any 2010 functionality.
2) Try to make a 2010 call to the Exchange Service, and if it fails, fall back to 2007.
Am I understanding correctly?
-jeff - EwsSupportedSchemas returns the schemas supported by the Exchange Web Services on the URL provided by the InternalEwsUrl and ExternalEwsUrl.
Maybe I'm not understanding what version information you're actually looking for. Can you clarify?
David Claux | Program Manager - Exchange Web Services - >> EwsSupportedSchemas returns the schemas supported by the Exchange Web Services on the URL provided by the InternalEwsUrl and ExternalEwsUrl.
This is what I want. This is not what I'm experiencing, however. Regardless of the Exchange Web Services on the URL provided by InternalEwsUrl, I get the same EwsSupportedSchemas value:
<UserSetting i:type="StringSetting">
<Name>EwsSupportedSchemas</Name>
<Value>Exchange2007, Exchange2007_SP1, Exchange2010</Value>
</UserSetting>
This same value happens for both accounts, where one is on 2007 and another is on 2010.
-jeff


