Triệu chứng
Bạn cố gắng tự động tạo ra mã proxy dựa trên sơ đồ Microsoft Exchange Server 2010 gói dịch vụ 1 (SP1). Trong trường hợp này, dòng sau bị thiếu trong mã proxy:
[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")]
Do đó, proxy tạo tự động hỗ trợ Exchange Impersonation.This vấn đề ảnh hưởng ba hoạt động sau:
-
GetUserOofSettings
-
SetUserOofSettings
-
GetUserAvailability
Giải pháp
Để giải quyết vấn đề này, cài đặt bản Cập Nhật sau đây:
2579150 Mô tả Update Rollup 4 cho Exchange Server 2010 gói dịch vụ 1
Giải pháp
Để khắc phục sự cố này, sử dụng Microsoft Exchange Web Services (EWS) quản lý API 1.1 thay đổi lớp tạo ra giản đồ. Để thực hiện việc này, hãy thêm dòng sau mã proxy:
[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")]
Dưới đây là một mẫu cho các hoạt động GetUserOofSettings . Mã ban đầu:
[System.Web.Services.Protocols.SoapHeaderAttribute("ServerVersionInfoValue", Direction = System.Web.Services.Protocols.SoapHeaderDirection.Out)][System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/exchange/services/2006/messages/GetUserOofSettings", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)][return: System.Xml.Serialization.XmlElementAttribute("GetUserOofSettingsResponse", Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")]public GetUserOofSettingsResponse GetUserOofSettings([System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")] GetUserOofSettingsRequest GetUserOofSettingsRequest){ object[] results = this.Invoke("GetUserOofSettings", new object[] { GetUserOofSettingsRequest}); return ((GetUserOofSettingsResponse)(results[0]));}
Thay đổi mã:
[System.Web.Services.Protocols.SoapHeaderAttribute("ServerVersionInfoValue", Direction = System.Web.Services.Protocols.SoapHeaderDirection.Out)][System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")][System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://schemas.microsoft.com/exchange/services/2006/messages/GetUserOofSettings", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)][return: System.Xml.Serialization.XmlElementAttribute("GetUserOofSettingsResponse", Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")]public GetUserOofSettingsResponse GetUserOofSettings([System.Xml.Serialization.XmlElementAttribute(Namespace = "http://schemas.microsoft.com/exchange/services/2006/messages")] GetUserOofSettingsRequest GetUserOofSettingsRequest){ object[] results = this.Invoke("GetUserOofSettings", new object[] { GetUserOofSettingsRequest}); return ((GetUserOofSettingsResponse)(results[0]));}
Trạng thái
Microsoft đã xác nhận đây là sự cố trong các sản phẩm của Microsoft được liệt kê trong phần "Áp dụng cho".
Thông tin Bổ sung
Để biết thêm thông tin về hoạt động GetUserOofSettings , ghé thăm website sau của Microsoft:
Thông tin chung về hoạt động GetUserOofSettingsĐể biết thêm thông tin về hoạt động SetUserOofSettings , ghé thăm website sau của Microsoft:
Thông tin chung về hoạt động SetUserOofSettingsĐể biết thêm thông tin về hoạt động GetUserAvailability , ghé thăm website sau của Microsoft:
Thông tin chung về hoạt động GetUserAvailabilityĐể biết thêm chi tiết về Exchange mạo danh, hãy ghé thăm website sau của Microsoft: