如何使用EWS API检测Exchange服务器版本? [英] How to detect exchange server version using EWS API?

查看:281
本文介绍了如何使用EWS API检测Exchange服务器版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我是这个EWS领域的新手,我正在寻找一种方法来检测交换服务器版本信息,无论用户邮箱是Exchange 2007还是2010或2013如果我们之前已经发布了这样的问题,请道歉,我在这里发布,因为我现在可以找到
任何这样的论坛。


1。是否可以使用EWS API获取此信息?我现在正在使用EWS 2.0库。


2。如果是,我怎样才能获得这些信息?你能提供一些样品吗?


提前致谢。




sureshh ...

解决方案

1。在2010年及以上,您可以使用自动发现来获取EWS Schema版本,这是最准确的使用方法。了解EWS Schema版本与仅仅服务器的重要性在

http://msdn.microsoft.com/en-us/library/office/dn741586%28v=exchg.150%29.aspx
。用于获取服务器版本的一些EWS托管API代码看起来像

 AutodiscoverService adAutoDiscoverService = new AutodiscoverService(); 
adAutoDiscoverService.Credentials = ncCred;
adAutoDiscoverService.EnableScpLookup = true;
adAutoDiscoverService.RedirectionUrlValidationCallback = adAutoDiscoCallBack;
adAutoDiscoverService.PreAuthenticate = true;
adAutoDiscoverService.TraceEnabled = true;
adAutoDiscoverService.KeepAlive = false;
GetUserSettingsResponse adResponse = adAutoDiscoverService.GetUserSettings(" user@domain.com",(new UserSettingName [1] {UserSettingName.EwsSupportedSchemas}));

这赢了在2007年工作,但你可以使用的另一种方法是,如果你将版本设置为2007_SP1并进行调用,如绑定到收件箱文件夹,然后检查ServerInfo中的结果  http://msdn.microsoft.com/en-us/library/microsoft.exchange .webservices.data.exchangeservicebase.serverinfo(v = exchg.80).aspx
。 (注意,如果您要使用ServerInfo,则需要像FolderBind一样发出请求。)


干杯

Glen



Hello there,

I am new to this EWS area and I am looking for a way to detect exchange server version information whether user mailbox is exchange 2007 or 2010 or 2013 etc. Apologize if we already have such question posted earlier, I am posting it here as I could now find any such forum.

1. Is it possible to fetch this information using EWS API? I am using EWS 2.0 libraries for now.

2. If yes, how can i get that information? can you please provide some sample?

Thanks in advance.


sureshh...

解决方案

1. On 2010 and above you can use Autodiscover to get the EWS Schema version this is most accurate method to use. It's import to understand the EWS Schema version vs just the Server there is a good write up in http://msdn.microsoft.com/en-us/library/office/dn741586%28v=exchg.150%29.aspx . Some EWS Managed API code to get the server version would look like

            AutodiscoverService adAutoDiscoverService = new AutodiscoverService();
            adAutoDiscoverService.Credentials = ncCred;
            adAutoDiscoverService.EnableScpLookup = true;
            adAutoDiscoverService.RedirectionUrlValidationCallback = adAutoDiscoCallBack;
            adAutoDiscoverService.PreAuthenticate = true;
            adAutoDiscoverService.TraceEnabled = true;
            adAutoDiscoverService.KeepAlive = false;
            GetUserSettingsResponse adResponse = adAutoDiscoverService.GetUserSettings("user@domain.com", (new UserSettingName[1] { UserSettingName.EwsSupportedSchemas }));

This won't work on 2007 but the other method you can use is if you set the version to 2007_SP1 and make a call like binding to the Inbox folder and then check the result in ServerInfo http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservicebase.serverinfo(v=exchg.80).aspx . (Note if your are going to use ServerInfo you do need to make a request like a FolderBind ).

Cheers
Glen


这篇关于如何使用EWS API检测Exchange服务器版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆