none
Microsoft.Exchange.WebServices.Data.ServiceXmlDeserializationException RRS feed

  • Question

  • I am trying to develop a website and there is a function to automatically trigger a e-mail notification.

    the website is deployed in my company's intranet. this is a domain environment and uses windows authentication.

    when I access the website from local machine, it can connect to exchange server and send e-mail with no problem. but when I access the website from the other machine, it failed with error message

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Microsoft.Exchange.WebServices.Data.ServiceXmlDeserializationException: The expected XML node type was XmlDeclaration, but the actual type is Element.

    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:
    [ServiceXmlDeserializationException: The expected XML node type was XmlDeclaration, but the actual type is Element.]
       Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read(XmlNodeType nodeType) +171
       Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettingsAtUrl(String emailAddress, Uri url) +797
       Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List`1 redirectionEmailAddresses, Int32& currentHop) +239
       Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetLegacyUserSettings(String emailAddress) +416
       Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.InternalGetLegacyUserSettings(String emailAddress, List`1 requestedSettings) +60
       Microsoft.Exchange.WebServices.Autodiscover.AutodiscoverService.GetUserSettings(String userSmtpAddress, UserSettingName[] userSettingNames) +99
       Microsoft.Exchange.WebServices.Data.ExchangeService.GetAutodiscoverUrl(String emailAddress, ExchangeVersion requestedServerVersion, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback) +136
       Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress, AutodiscoverRedirectionUrlValidationCallback validateRedirectionUrlCallback) +216
       Microsoft.Exchange.WebServices.Data.ExchangeService.AutodiscoverUrl(String emailAddress) +47
       Default2.Page_Load(Object sender, EventArgs e) +78
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    

    Can anybody tell me why it success when accessing from local machine but fail from remote machine.

    Monday, August 17, 2015 2:03 PM

All replies

  • Most probably something in the network path is corrupting of modifying the SOAP request that is being sent or received to the server. Best way to find out what is happening is use something like fiddler to look at the requests that are being submitted to and from the server and compare what you get with a successful request to unsuccessful. (in the past I've seen web proxies break the requests)

    cheers
    Glen

     
    Tuesday, August 18, 2015 5:37 AM