Exchange 2010 サーバーで Exchange Web サービス (ews) に接続しようとしています。私が使用しているコードは次のとおりです。
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Exchange.WebServices.Data;
namespace NDR_Processor
{
    class Program
{
    static void Main(string[] args)
    {
        ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
        service.Credentials = new System.Net.NetworkCredential("redacted", "redacted", "redacted");
        service.Url = new Uri("https://exchange.redacted.net/EWS/Exchange.asmx");
        System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
        FindItemsResults<Item> findResults = service.FindItems(WellKnownFolderName.Inbox, new ItemView(1000));
        foreach (Item item in findResults.Items)
        {
            Console.WriteLine(item.Subject);
            Console.WriteLine(item.Body);
        }
    }
}
}
ただし、そうすると、「サービスから受信した応答に有効な XML が含まれていませんでした」というエラーが表示されます。内部例外は次を示します: {"ルート レベルのデータが無効です。1 行目、1 番目の位置。"}
Web ブラウザでhttps://exchange.redacted.net/EWS/Exchange.asmxにアクセスしようとしましたが、ログインするように求められ、有効な XML ドキュメントが表示されます。そのため、アプリケーションが窒息している理由がわかりません。
なぜこれが起こっているのか、どうすれば解決できるのか、誰か考えがありますか?
ありがとうブラッド