我正在尝试使用 EWS 获取收件箱文件夹信息。
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);**//Here Exchange2007_SP3 version not coming.Only(Exchange2007_SP1,Exchange2010,Exchange2010_SP1,Exchange2010_SP2) are available**
service.Credentials = new WebCredentials(UserName, Password, DomainName);
service.Url = new Uri("HTTPS://" + ServerName + "/EWS/Exchange.asmx");
Folder rootfolder = Folder.Bind(service, WellKnownFolderName.Inbox);**//Error Arises**
foreach (Folder folder in rootfolder.FindFolders(new FolderView(int.MaxValue)))
{
}
我收到错误: 客户端访问服务器版本与访问资源的邮箱服务器版本不匹配。将 AutoDiscover 与正在访问的资源的地址一起使用,以确定用于访问指定资源的正确 URL。
If i use autodiscover service , For that to error arises.
service.AutodiscoverUrl("adminuser@Domain.com",RedirectionUrlValidationCallback);
我收到错误: 找不到自动发现服务。