Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

徵狀

您試著自動產生 proxy 程式碼,根據 Microsoft Exchange Server 2010 Service Pack 1 (SP1) 結構描述。 在此情況下下, 面這一行沒有出現在 proxy 程式碼:

[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")] 

因此,自動產生的 proxy 並不支援 Exchange Impersonation.This 問題會影響下列三個作業:

  • GetUserOofSettings

  • SetUserOofSettings

  • GetUserAvailability

解決方案

若要解決這個問題,安裝下列更新彙總套件:

2579150 更新彙總套件 4 的 Exchange Server 2010 Service Pack 1 的描述

因應措施

若要解決這個問題,請使用 Microsoft Exchange Web 服務 (EWS) Managed API 1.1 變更結構描述中產生的類別。 若要這麼做,請在 proxy 程式碼中加入下面這一行:

[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")] 

下面是GetUserOofSettings操作的範例。原來的程式碼:

[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]));}

變更的程式碼:

[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]));}

狀態

Microsoft 已確認<適用於>一節中所列的 Microsoft 產品確實有上述問題。

其他相關資訊

如需有關GetUserOofSettings操作的詳細資訊,請造訪下列 Microsoft 網站:

GetUserOofSettings 作業的一般資訊如需有關SetUserOofSettings操作的詳細資訊,請造訪下列 Microsoft 網站:

SetUserOofSettings 作業的一般資訊如需有關GetUserAvailability操作的詳細資訊,請造訪下列 Microsoft 網站:

GetUserAvailability 作業的一般資訊如需有關 Exchange 模擬的詳細資訊,請造訪下列 Microsoft 網站:

Exchange 模擬的一般資訊

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×