locked
Exchange Web-services stopped working. Unable to access the /ews/exchange.asmx URL. RRS feed

  • Question

  • Launching the https://autodiscover.XXXXX.com/ews/exchange.asmx throws "Server Error in '/EWS' Application." 

    ------------
    Invalid URI: The hostname could not be parsed.

    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: System.UriFormatException: Invalid URI: The hostname could not be parsed.

    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: 


    [UriFormatException: Invalid URI: The hostname could not be parsed.]
       System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) +8603457
       Microsoft.Exchange.Net.WSTrust.TokenValidator..ctor(Uri targetUri, IEnumerable`1 trustedTokenIssuerCertificates, IEnumerable`1 tokenDecryptionCertificates) +163
       Microsoft.Exchange.Data.Storage.Authentication.ExternalAuthentication.CreateExternalAuthentication() +1160
       Microsoft.Exchange.Data.Storage.Authentication.ExternalAuthentication.GetCurrent() +25
       Microsoft.Exchange.Services.Wcf.EWSServiceCredentialsElement.CreateBehavior() +455
       System.ServiceModel.Description.ConfigLoader.LoadBehaviors(ServiceModelExtensionCollectionElement`1 behaviorElement, KeyedByTypeCollection`1 behaviors, Boolean commonBehaviors) +239
       System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress, Boolean skipHost) +1691
       System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection) +106
       System.ServiceModel.ServiceHostBase.ApplyConfiguration() +234
       System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) +206
       System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) +170
       Microsoft.Exchange.Services.Wcf.EWSServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +55
       System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1849
       System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +66
       System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +738

    [ServiceActivationException: The service '/EWS/exchange.asmx' cannot be activated due to an exception during compilation.  The exception message is: Invalid URI: The hostname could not be parsed..]
       System.Runtime.AsyncResult.End(IAsyncResult result) +594083
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +238
       System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +178


    Can anyone help me resolve this issue.
    Thursday, September 14, 2017 10:14 AM

All replies

  • Hi,

    From the error message, I notice that it's an invalid URL for EWS service.
    Would you please run below command on EMS?
    Get-WebServicesVirtualDirectory | FL Identity,*Auth*,*URL*

    If you get the proper URL, then browser in IE and sign-in for testing.
    Note: ensure there's a valid DNS record for this host name.

    Regards,

    Allen Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, September 15, 2017 10:27 AM
    Moderator
  • Hi,

    Does this issue fix after configure proper EWS URL in Exchange server?
    If the above suggestion helps, please be free to mark it as answer. Thanks.

    Regards,

    Allen Wang


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, September 18, 2017 2:50 PM
    Moderator