Exchange 2013 CU8 Application Event Warning 1310 – Microsoft.Exchange.Security Assembly

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”&gt;
<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&amp; 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&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; 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&gt;
<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&amp; 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.

EWS Error shown in browser representing Event ID 1310

EWS Error shown in browser representing Event ID 1310

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.

Example of SharedWebConfig.config file contents

Example of SharedWebConfig.config file contents

SharedWebConfig.config File location

SharedWebConfig.config File location

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.

Advertisements

About Gary Cooper

I am a Senior Systems Architect for a small midwestern US consulting company (Horizons Consulting) and I currently am certified by Microsoft
This entry was posted in Uncategorized. Bookmark the permalink.

7 Responses to Exchange 2013 CU8 Application Event Warning 1310 – Microsoft.Exchange.Security Assembly

  1. Frank Pineda says:

    Hi Gary,
    I ran through the same issue with a different assembly and this post pointed me onto the right direction.
    Thanks very much.

  2. Dan Ramirez says:

    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!

  3. Rob Walker says:

    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.

  4. Gal Cohen says:

    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!

  5. Glenn says:

    Thanks for this post, It did the trick on a new 2016 install.

  6. Pingback: OWA, Something went wrong :( and the case of the missing sharedwebconfig.config | glennopedia

  7. Same to me with 2013 cu 14.
    Much appreciated!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s