"GetUserOofSettings", "SetUserOofSettings" and "GetUserAvailability" operations do not support Exchange Impersonation on the Exchange Server 2010 SP1 schema

Article translations Article translations
Article ID: 2512023 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You try to auto-generate proxy code based on the Microsoft Exchange Server 2010 Service Pack 1 (SP1) schema. In this situation, the following line is missing in the proxy code:
[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")] 
Therefore, the auto-generated proxies do not support Exchange Impersonation.

This issue affects the following three operations:
  • GetUserOofSettings
  • SetUserOofSettings
  • GetUserAvailability

RESOLUTION

To resolve this issue, install the following update rollup:
2579150 Description of Update Rollup 4 for Exchange Server 2010 Service Pack 1

WORKAROUND

To work around this issue, use Microsoft Exchange Web Services (EWS) Managed API 1.1 to change the generated classes in the schema. To do this, add the following line in the proxy code:
[System.Web.Services.Protocols.SoapHeaderAttribute("ExchangeImpersonation")] 
Below is a sample for the GetUserOofSettings operation.

Original code:
[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]));
}
Changed code:
[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]));
}

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the GetUserOofSettings operation, visit the following Microsoft website:
General information about the GetUserOofSettings operation
For more information about the SetUserOofSettings operation, visit the following Microsoft website:
General information about the SetUserOofSettings operation
For more information about the GetUserAvailability operation, visit the following Microsoft website:
General information about the GetUserAvailability operation
For more information about Exchange Impersonation, visit the following Microsoft website:
General information about Exchange Impersonation

Properties

Article ID: 2512023 - Last Review: July 28, 2011 - Revision: 3.0
APPLIES TO
  • Microsoft Exchange Server 2010 Service Pack 1, when used with:
    • Microsoft Exchange Server 2010 Enterprise
    • Microsoft Exchange Server 2010 Standard
Keywords: 
kbsurveynew kbhotfixrollup kbfix kbexpertiseinter kbqfe KB2512023

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com