我们可以减少ExchangeWebsevice中AutodiscoverUrl消耗的时间

问题描述 投票:2回答:2

我正在使用AutodiscoverUrl连接到交换服务器,但是连接需要很长时间...有什么方法可以减少消耗的时间。

c# exchangewebservices
2个回答
4
投票

您是否尝试指定您的URL而不是使用自动发现?

m_ExchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
m_ExchangeService.UseDefaultCredentials = true;
m_ExchangeService.Url = new Uri("https://exchange.company.com/EWS/Exchange.asmx");

您可以通过在自动发现时首先调试应用程序来轻松找到特定的URL。

但是,最主要的问题可能是与Exchange Server的连接,如果是这种情况,您需要在代码之外寻找解决连接问题的解决方案(可能与安全性有关。设置?)。


0
投票

m_ExchangeService.Url =新的Uri(“ https://exchange.company.com/EWS/Exchange.asmx”);如果我使用此行,则会出现404错误。它不是验证凭据。

© www.soinside.com 2019 - 2024. All rights reserved.