none
exchange.asmx missing from /ews folder

    Question

  • While troubleshooting some issues after the CU1 installation, I discovered the following:

    EWS virtual directories are set to https:\\<server>\EWS\Exchange.asmx

    However, there is no exchange.asmx in the c:\program files\microsoft\exchange\v15\frontend\ews folder.  The only copies of this file on my system are in the extracted CU1 install (and base install) trees.

    In addition, when attempting to point a browser at the \EWS folder or \EWS\exchange.asmx, I receive a HTTP Error 500.19, Absolute physical path "c:\inetpub\custerr" is not allowed in sytem.webServer/httpErrors section in web.config file.  Use relative path instead.

    Also, when attempting to look at Apps in the admin ECP I receive an XML error (not valid XML).  Same in OWA for users in Config Apps.  Prior to CU1 this showed the three default apps.

    Finally, for Outlook users they cannot share calendars, cannot open shared calendars, nor see any Free/Busy information.  All of these functions work perfectly on OWA.

    Note that otherwise Autodiscovery appears to be working just fine on the system.

    Did the CU1 install have an issue?  What should exchange.asmx contain?

    Any help would be appreciated.

    Monday, April 08, 2013 5:27 PM

Answers

  • Looks like I found the initial cause of the 500.19 errors and related problems with OWA Apps and Calendar appear to have been correct.

    Primary issue:  I had set up a redirect on the Default Web Site to repoint to /owa.  I removed the redirect shortly after testing, but the system leaves a web.config file in C:\inetpub\wwwroot.  Renaming this web.config file so it is no longer read corrected all the issues.

    ExRCA now passes all EWS tests.

    • Marked as answer by E Long Monday, April 15, 2013 6:57 PM
    Monday, April 15, 2013 6:56 PM

All replies

  • Also, when doing the EWS tests on testexchangeconnectivity.com, during the create temporary folder step:

    Exception details:
    Message: The response received from the service didn't contain valid XML.
    Type: Microsoft.Exchange.WebServices.Data.ServiceRequestException
    Stack trace:
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadXmlDeclaration(EwsServiceXmlReader reader)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadSoapFault(EwsServiceXmlReader reader)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ProcessWebException(WebException webException)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.GetEwsHttpWebResponse(IEwsHttpWebRequest request)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ValidateAndEmitRequest(IEwsHttpWebRequest& request)
       at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
       at Microsoft.Exchange.WebServices.Data.ExchangeService.BindToFolder[TFolder](FolderId folderId, PropertySet propertySet)
       at Microsoft.Exchange.Tools.ExRca.Tests.GetOrCreateSyncFolderTest.PerformTestReally()
    Exception details:
    Message: Data at the root level is invalid. Line 1, position 1.
    Type: System.Xml.XmlException
    Stack trace:
       at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
       at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlCharCheckingReader.Read()
       at Microsoft.Exchange.WebServices.Data.EwsXmlReader.Read(XmlNodeType nodeType)
       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.ReadXmlDeclaration(EwsServiceXmlReader reader)

    It would be nice if it said which file was involved, but I suspect it is related to the missing exchange.asmx file or the messed up web.config file.

    Any thoughts or suggestions?  Anyone want to share the contents of their /ews folder?

    Monday, April 08, 2013 7:29 PM
  • Hello,

    Outlook users cannot share calendars, cannot open shared calendars, nor see any Free/Busy information. All of these functions work perfectly on OWA. It means your autodiscover may be problem. I suggest you use EXRCA to check autodiscover settings.

    While, I suggest you recreate EWS virtual directory.


    Cara Chen
    TechNet Community Support

    Tuesday, April 09, 2013 11:31 AM
  • The results for the autodiscover test in ExRCA is: Autodiscover was tested successfully.

    All test there pass except for the EWS general test which fails with the error above.

    Does recreate mean doing Remove-WebServicesVirtualDirectory, New-WebServicesVirtualDirectory?

    Any other preperation/post actions needed?

    Tuesday, April 09, 2013 11:43 AM
  • Okay, I reset the EWS virtual directory and the results are completely unchanged. 

    No exchange.asmx.

    Get an HTTP 500.19 when attempting to browse directly to it

    The Apps page in OWA generates a no valid XML error, and

    ExRCA for Autodiscover completes successfully, but the EWS test fails with the stack trace above.

    This all worked before CU1.  What is changed/wrong here?  Anyone have any idea?

    Thanks.

    Addtional Information:  I have the following errors showing up in the logs:

    Event code: 3008

    Event message: A configuration error has occurred.

    Event time: 4/9/2013 3:19:53 PM

    Event time (UTC): 4/9/2013 7:19:53 PM

    Event ID: 7da2f170dba145568a89a89c41c50703

    Event sequence: 1

    Event occurrence: 1

    Event detail code: 0

    Application information:

        Application domain: /LM/W3SVC/1/ROOT/EWS-40-130100087930093847

        Trust level: Full

        Application Virtual Path: /EWS

        Application Path: C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\EWS\

        Machine name: XXXXX

    Process information:

        Process ID: 9000

        Process name: w3wp.exe

        Account name: NT AUTHORITY\SYSTEM

    Exception information:

        Exception type: ConfigurationErrorsException

        Exception message: Could not load file or assembly 'Microsoft.Exchange.Data.Directory, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\EWS\web.config line 38)

       at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

       at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()

       at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)

       at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath)

       at System.Web.Compilation.BuildManager.ExecutePreAppStart()

       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

    Could not load file or assembly 'Microsoft.Exchange.Data.Directory, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)

       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

       at System.Reflection.Assembly.Load(String assemblyString)

       at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

    Request information:

        Request URL: https://<domain>:443/ews/exchange.asmx

        Request path: /ews/exchange.asmx

        User host address: ::1

        User: 

        Is authenticated: False

        Authentication Type: 

        Thread account name: NT AUTHORITY\SYSTEM

    Thread information:

        Thread ID: 8

        Thread account name: NT AUTHORITY\SYSTEM

        Is impersonating: False

        Stack trace:    at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)

       at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()

       at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)

       at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath)

       at System.Web.Compilation.BuildManager.ExecutePreAppStart()

       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

    Custom event details:


    In addition I see errors: Could not load type 'Microsoft.Exchange.HttpProxyApplication'

    Event code: 3006

    Event message: A parser error has occurred.

    Event time: 4/9/2013 3:33:15 PM

    Event time (UTC): 4/9/2013 7:33:15 PM

    Event ID: 5c0599cdcf484235b2008b185aeb7868

    Event sequence: 1

    Event occurrence: 1

    Event detail code: 0

    Application information:

        Application domain: /LM/W3SVC/1/ROOT/EWS-76-130100095950430324

        Trust level: Full

        Application Virtual Path: /EWS

        Application Path: C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\EWS\

        Machine name: IDGEX1

    Process information:

        Process ID: 9000

        Process name: w3wp.exe

        Account name: NT AUTHORITY\SYSTEM

    Exception information:

        Exception type: HttpException

        Exception message: Could not load type 'Microsoft.Exchange.HttpProxy.ProxyApplication'.

       at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()

       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

    Could not load type 'Microsoft.Exchange.HttpProxy.ProxyApplication'.

       at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

       at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)

       at System.Web.UI.TemplateParser.Parse()

       at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()

       at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)

       at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()

       at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()

       at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp)

       at System.Web.Compilation.BuildManager.CompileGlobalAsax()

       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

    Could not load type 'Microsoft.Exchange.HttpProxy.ProxyApplication'.

       at System.Web.UI.TemplateParser.ProcessException(Exception ex)

       at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)

       at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)

    Could not load type 'Microsoft.Exchange.HttpProxy.ProxyApplication'.

       at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)

       at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)

       at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)

    Request information:

        Request URL: <domain>:443/ews.exchange.asmx

        Request path: /ews/exchange.asmx

        User host address: x.xx.xx.xx

        User: 

        Is authenticated: False

        Authentication Type: 

        Thread account name: NT AUTHORITY\SYSTEM

    Thread information:

        Thread ID: 38

        Thread account name: NT AUTHORITY\SYSTEM

        Is impersonating: False

        Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()

       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

    Custom event details:

    • Edited by E Long Tuesday, April 09, 2013 7:39 PM
    Tuesday, April 09, 2013 7:15 PM
  • A minor amount of additional information.

    I have checked the system, and the Microsoft.Exchange.Data.Directory.dll is in the location specified in the web.config file in /EWS.  I checked all of the assemblies mentioned in the web.config file and all of them are in the locations specified.  I have no idea what dependencies the Microsoft.Exchange.Data.Directory assembly may require, but I suspect this isn't the root cause since the assembly is referenced in /OWA also and OWA appears to be working without any real issues (except the Options/App tab returns an XML error).

    Eric.

    Wednesday, April 10, 2013 12:56 PM
  • One final bit, maybe this will help - 

    I am seeing 401 errors for /ews/exchange.asmx when, for example, an Outlook client attempts to access a shared calendar:

    2013-04-10 14:32:43 192.168.2.13 POST /ews/exchange.asmx - 443 - 192.168.2.163 Microsoft+Office/14.0+(Windows+NT+6.1;+Microsoft+Outlook+14.0.6129;+Pro) - 401 0 0 203

    Any hints?  I am completely lost here.

    Thanks.

    Wednesday, April 10, 2013 2:36 PM
  • Hello,

    Have you done "Remove-WebServicesVirtualDirectory" and then "New-WebServicesVirtualDirectory"?

    I suggest you run test-outlookwebservices to check if there is any error.

    Please check if there is any error in application log.


    Cara Chen
    TechNet Community Support

    Thursday, April 11, 2013 8:48 AM
  • Yes, I've reset the WebServices virtual directories twice.

    The output from test-outlookwebservices shows Autodiscover pass and the following for Exchange Web Services:

    unspaceId          : a425b1fe-f0f4-4691-b123-e1b12e8dc94b
    Source              : IDGEX1.idg.minervaengineering.com
    ServiceEndpoint     : webmail.minervaengineering.com
    Scenario            : ExchangeWebServices
    ScenarioDescription : Exchange Web Services
    Result              : Failure
    Latency             : 1
    Error               : System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
                             at System.Net.HttpWebRequest.GetResponse()
                             at
                          Microsoft.Exchange.Management.SystemConfigurationTasks.ServiceValidatorBase.InternalInvoke()
                             at Microsoft.Exchange.Management.SystemConfigurationTasks.ServiceValidatorBase.Invoke()

    As you can see, attempts to invoke /ews/exchange.asmx are generating Internal Server Errors.  Availability and OAB tests weren't performed because the EWS test fails.

    Thursday, April 11, 2013 11:58 AM
  • Looks like I found the initial cause of the 500.19 errors and related problems with OWA Apps and Calendar appear to have been correct.

    Primary issue:  I had set up a redirect on the Default Web Site to repoint to /owa.  I removed the redirect shortly after testing, but the system leaves a web.config file in C:\inetpub\wwwroot.  Renaming this web.config file so it is no longer read corrected all the issues.

    ExRCA now passes all EWS tests.

    • Marked as answer by E Long Monday, April 15, 2013 6:57 PM
    Monday, April 15, 2013 6:56 PM