通常來說出錯的是這一行(The request failed with HTTP status 405: Method Not Allowed )
FindItemResponseType findItemResponse = esb.FindItem(findItemRequest);
修正的地方為
ExchangeServiceBinding esb = new ExchangeServiceBinding();
esb.Credentials = new NetworkCredential(@"id", "pw", "domain");
esb.Url = @"https://test.com.tw/EWS/Services.wsdl";
改成
esb.Url = @"https://test.com.tw/EWS/Exchange.asmx";
沒有留言:
張貼留言