Article ID: 2512023 - Last Review: July 28, 2011 - Revision: 3.0

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

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
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  (http://support.microsoft.com/kb/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 (http://msdn.microsoft.com/en-us/library/aa563465.aspx)
For more information about the SetUserOofSettings operation, visit the following Microsoft website:
General information about the SetUserOofSettings operation (http://msdn.microsoft.com/en-us/library/aa580294.aspx)
For more information about the GetUserAvailability operation, visit the following Microsoft website:
General information about the GetUserAvailability operation (http://msdn.microsoft.com/en-us/library/aa564001.aspx)
For more information about Exchange Impersonation, visit the following Microsoft website:
General information about Exchange Impersonation (http://msdn.microsoft.com/en-us/library/bb204095(v=EXCHG.140).aspx)

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