Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


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

↑ Back to the top


Resolution

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

↑ Back to the top


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

↑ Back to the top


Status

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

↑ Back to the top


More Information

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

↑ Back to the top


Keywords: kbsurveynew, kbhotfixrollup, kbfix, kbexpertiseinter, kbqfe, kb

↑ Back to the top

Article Info
Article ID : 2512023
Revision : 2
Created on : 9/25/2018
Published on : 9/25/2018
Exists online : False
Views : 279