2

EWS Web サービス URL を呼び出して予定アイテムを作成するときに 401 無許可エラーが返される理由を知っている人はいますか? service.AutodiscoverUrl は正常に実行されますが、予定項目を保存するとエラーになります。

Outlook10、Exchange 2010、および EWS v2.0 を使用しています。コードは次のとおりです。

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);

ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
                ServicePointManager.ServerCertificateValidationCallback = CertificateValidationCallBack;
service.Credentials = new WebCredentials("myemail", "mypassword", "mydomain.com"); 
    service.Url = new Uri("https://myEWSDomain/EWS/Exchange.asmx");
    service.AutodiscoverUrl("myemail", RedirectionUrlValidationCallback2);

Appointment appointment = new Appointment(service);
appointment.Subject = "Testing";
appointment.Start = DateTime.Now;
appointment.End = appointment.Start.AddHours(1);
appointment.RequiredAttendees.Add("user@test.com");
appointment.Save(SendInvitationsMode.SendOnlyToAll);

どんな助けでも大歓迎です。

ありがとう

エコー

4

0 に答える 0