I ran into a new issue that isn’t well documented publicly earlier this week. I installed two new Exchange 2013 CU8 servers as “Hybrid” servers for an Office 365 integration deployment. After configuring the servers, I noticed that none of the web based services on one of the servers was functioning properly and the following Application Event Log entry was reported for all web services (EWS, ActiveSync, MAPI, RPC, OWA, etc…).
Log Name: Application
Source: ASP.NET 4.0.30319.0
Date: 6/10/2015 11:04:59 AM
Event ID: 1310
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: Server1.company.com
Description:
Event code: 3008 Event message: A configuration error has occurred. Event time: 6/10/2015 11:04:59 AM Event time (UTC): 6/10/2015 4:04:59 PM Event ID: 9aca57c1b125421aa3d7faf91155a099 Event sequence: 1 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/2/ROOT/EWS-290-130784258993945463 Trust level: Full Application Virtual Path: /EWS Application Path: C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\exchweb\EWS\ Machine name: Server1 Process information: Process ID: 12184 Process name: w3wp.exe Account name: NT AUTHORITY\SYSTEM Exception information: Exception type: ConfigurationErrorsException Exception message: Could not load file or assembly ‘Microsoft.Exchange.Security, 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\ClientAccess\exchweb\EWS\web.config line 94)
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, Boolean& isRefAssemblyLoaded)
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.Security, 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://localhost:444/ews/exchange.asmx Request path: /ews/exchange.asmx User host address: 127.0.0.1 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\SYSTEM Thread information: Thread ID: 26 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, Boolean& isRefAssemblyLoaded)
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:
Event Xml:
<Event xmlns=”http://schemas.microsoft.com/win/2004/08/events/event”>
<System>
<Provider Name=”ASP.NET 4.0.30319.0″ />
<EventID Qualifiers=”32768″>1310</EventID>
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime=”2015-06-10T16:04:59.000000000Z” />
<EventRecordID>548169</EventRecordID>
<Channel>Application</Channel>
<Computer>Server1.company.com</Computer>
<Security />
</System>
<EventData>
<Data>3008</Data>
<Data>A configuration error has occurred.</Data>
<Data>6/10/2015 11:04:59 AM</Data>
<Data>6/10/2015 4:04:59 PM</Data>
<Data>9aca57c1b125421aa3d7faf91155a099</Data>
<Data>1</Data>
<Data>1</Data>
<Data>0</Data>
<Data>/LM/W3SVC/2/ROOT/EWS-290-130784258993945463</Data>
<Data>Full</Data>
<Data>/EWS</Data>
<Data>C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\exchweb\EWS\</Data>
<Data>Server1</Data>
<Data>
</Data>
<Data>12184</Data>
<Data>w3wp.exe</Data>
<Data>NT AUTHORITY\SYSTEM</Data>
<Data>ConfigurationErrorsException</Data>
<Data>Could not load file or assembly ‘Microsoft.Exchange.Security, 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\ClientAccess\exchweb\EWS\web.config line 94)
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, Boolean& isRefAssemblyLoaded)
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.Security, 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)
</Data>
<Data>https://localhost:444/ews/exchange.asmx</Data>
<Data>/ews/exchange.asmx</Data>
<Data>127.0.0.1</Data>
<Data>
</Data>
<Data>False</Data>
<Data>
</Data>
<Data>NT AUTHORITY\SYSTEM</Data>
<Data>26</Data>
<Data>NT AUTHORITY\SYSTEM</Data>
<Data>False</Data>
<Data> 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, Boolean& isRefAssemblyLoaded)
at System.Web.Compilation.BuildManager.ExecutePreAppStart()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
</Data>
</EventData>
</Event>
Based upon this event as well as the error shown in the browser when attempting to use one of these services.
After checking the web.config files on each web service directory and not finding any issue, we opened a PSS case and found an undocumented issue with installation of the server. For an unknown reason, the SharedWebConfig.Config file was missing on the server altogether. It should be located at C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess, but in this case the file was not there. This file contains a listing of all DDL Assembly locations including the Microsoft.Exchange.Security DLL that was in the error.
The solution was to simply copy this config file from a working server with the same install path and restart IIS. Hopefully, this will assist anyone else facing this issue.
Hi Gary,
I ran through the same issue with a different assembly and this post pointed me onto the right direction.
Thanks very much.
Hey Gary…I’ve been working on issue that came up after building a new Exchange CAS/MBX to replace an older on-prem server. I used latest build, Exchange 2013 CU9. After clean install the event viewer continued to receive 1310 events every couple of mins. FInding this was the exact fix I needed. Thanks a ton for documenting your issue and fix found through MS PSS, and I am not sure how MS will leave the same bug from CU8 when releasing CU9. Thanks again!
Thanks for the post… this happened to me on Exchange 2016 when you do not install Exchange to the default directory. Copy “%ExchangeInstallDir%\FrontEnd\HttpProxy\SharedWebConfig.config” to “%ExchangeInstallDir%\ClientAcess” and OWA and ECP worked like a charm.
https://support.microsoft.com/en-us/kb/3099532
That’s what worked for me, thank you for your post, its what lead me to that somehow. Appreciate your time!
Thanks for this post, It did the trick on a new 2016 install.
Pingback: OWA, Something went wrong :( and the case of the missing sharedwebconfig.config | glennopedia
Same to me with 2013 cu 14.
Much appreciated!