我的交换服务有效。我可以通过 Outlook 查看所有房间,并且可以通过 Powershell 查看所有房间。但是有了这个片段,我无法检索任何房间
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.UseDefaultCredentials = true;
service.Url = new Uri("https://my server/ews/exchange.asmx");
service.AutodiscoverUrl("username@myserver.com", RedirectionCallback);
EmailAddressCollection myRoomLists = service.GetRoomLists();
// Display the room lists.
foreach (EmailAddress address in myRoomLists)
{
Console.WriteLine("Email Address: {0} Mailbox Type: {1}", address.Address, address.MailboxType);
}
列表是空的!