Ran into a strange problem recently. I installed Exchange 2016 CU2 onto a brand new machine. This was the first Exchange 2016 server in the environment. Exchange 2010 SP3 RU14 was in coexistence. I could access the Exchange Control Panel fine. But when I accessed Outlook on the Web (formerly Outlook Web App) I received an Internal 500 server error. Not good. Especially on a brand new install.

Checking the application log revealed a ton of ASP.NET warnings. The warning had a source ASP.NET with Event ID 1310. Inside each warning was internal code 3008 with event message, A configuration error has occurred. The specifics are below.
ASP.NET Event ID 1310 Event Code 3008 Event code: 3008 Event message: A configuration error has occurred. Event time: 9/1/2016 7:00:00 PM Event time (UTC): 9/1/2016 11:00:00 PM Event ID: 33cf7da9abe544e8b562fe0ab5437b57 Event sequence: 1 Event occurrence: 1 Event detail code: 0
We quickly found our answer in the exception message. In many instances the Microsoft.Exchange.Security assembly was missing. Other missing assemblies were referenced in separate warnings as well. I’ve highlighted the section below.
Application information: Application domain: /LM/W3SVC/2/ROOT/Rpc-5-131151587676742621 Trust level: Full Application Virtual Path: /Rpc Application Path: C:\Windows\System32\RpcProxy\ Machine name: EX16-01 Process information: Process ID: 10784 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:\Windows\System32\RpcProxy\web.config line 38) ...edited for brevity... 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. ...edited for brevity...
Unfortunately, checking the Web.Config file at the path highlighted above didn’t shed much light either. Line 38 and the surrounding lines read as followed.
<system.web> <compilation debug="false"> <assemblies> <add assembly="Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </assemblies> </compilation> </system.web>
Towards the bottom of the Web.Config file a linked configuration file named SharedWebConfig.Config was referenced.
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <linkedConfiguration href="file://C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\SharedWebConfig.config" /> </assemblyBinding>
When I checked this path mentioned above no SharedWebConfig file existed. I quickly compared this against another Exchange 2016 CU2 environment and confirmed the file did exist there. I am not sure why this file did not exist. I even saw some references to it in the Exchange setup log. Looks like this issue was also reported back in Exchange 2013 CU6.

Replace the missing SharedWebConfig file
Thankfully the fix is simple. Copy the SharedWebConfig file from another Exchange Server. Then perform an IISRESET from a command prompt.
There are a couple of caveats:
- The SharedWebConfig file must be copied from a server running the same Cumulative Update. For example, the SharedWebConfig.config file in CU2 contains more entries than the version in RTM.
- If the server you pull this file from has a different install path for Exchange you will need to do a find/replace of all paths inside the SharedWebConfig file and update with the destination server’s install path.

Once copied be sure to do an IISRESET from a command prompt.

You should now be able to log into Outlook on the Web successfully.

How about you? Have you experienced this error? Drop a comment below or join the conversation on Twitter @SuperTekBoy.
Awesome, This also applies to 2013, I had Microsoft rebuild the entire Ex 2013 server CU23 only to get this issue which they said wasn’t supported only the rebuild, even though I argued that is CAS doesn’t work nothing works as all client access is now through https, its taken me weeks to get to this solution. as always I’m amazed MS do do not pick these things up way back. Now back to MS to complain! Thanks guys.
P.S.
The link you mentioned regarding 2013, nailed it as there is a copy of sharedwebconfig.config file at Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy
Hey,
Thanks for the post it was really helpful.
I found an article on how to created the missing SharedWebConfig file. In case that someone don’t have another EX2016 server.
You just need to run the following command on %ExchangeInstallPath%\bin
———————–command———————————-
DependentAssemblyGenerator.exe -exchangePath “%ExchangeInstallPath%\bin” -exchangePath “%ExchangeInstallPath%\ClientAccess” -configFile “%ExchangeInstallPath%\ClientAccess\SharedWebConfig.config”
Here’s the link:
https://support.microsoft.com/es-cr/help/3099532/event-id-1309-and-you-can-t-access-owa-and-ecp-after-you-install-excha
Good afternoon Oscar,
Nice find. That sounds like a great alternative. I will have to try it out if I run into this problem again. Knock on wood, I have not seen this problem in over 12 months now.
Hey, thanks! Wow, this error is so common Microsoft had to write an article about it!
Seems like they could fix the bug — I just had this happen on a fresh Exchange 2016 CU10 install.
This article is just one example of what could cause the 500 error. More often than not its an ASP.NET error. Although recently I got a 500 error due to a missing System Mailbox.
Hi,
In Ex2016 CU6 I have problem with one of Exchange Server.
After Logon in ECP I got:
500 – Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed
and OWA Cannot find Mailbox.
Tracing HTTP request with Status Code 500 I got this:
ModuleName
ManagedPipelineHandler
Notification
EXECUTE_REQUEST_HANDLER
HttpStatus
500
HttpReason
Internal Server Error
HttpSubStatus
0
ErrorCode
The operation completed successfully.
(0x0)
And I stuck. Any ideas?
I have tried a million things and it seemed to be a combination of suggestions that has given me access to EAC.
I created a New Exchange Administrator account with all the required permissions. created the mailbox on my 2010 box (it didn’t work till i had created the mailbox, although other suggestions on the web have said not to do this). and then had to use the FQDN on my domain in the username.
Thanks for sharing your experience Doodleman99. Unfortunately, there are potentially a lot of causes for ASP.NET Event ID 1310 Event Code 3008. But glad to hear you got the issue resolved.
Haha, nice. But I do not have SharedWebConfig.config, must to reinstall 🙁
Sorry to hear that Son. I have avoided publishing it here because that file can change between cumulative updates and will change depending on where you installed Exchange.
I had both files and are still getting the 500 error
Sorry to hear that Michelle. What error are you seeing in the Application Logs? Is it reporting that “The system cannot find the file specified.”. There are potentially a lot of causes for ASP.NET Event ID 1310 Event Code 3008. The clues are usually in the exception information section of the error details.
Experienced the same in Exchange 2013 CU6 for two different customers.
Luckily easily fixed by copying the SharedWebConfig.config from another server.
Cheers
Rolf
Thank for this, Gareth.
In the past 4 weeks, I’ve seen this twice with new Exchange 2016 CU2 installs (along with a few other anomalies). Unfortunately for me, I ran a re-install of Exchange to resolve the issue. Now, I hopefully won’t need to do that.
Definitely some bugs with CU2. I ran into this issue that Jeff Guillet reported on regarding FrontEnd connectors as well.
http://www.expta.com/2016/07/cannot-create-frontend-receive.html
Yeah! Love that issue as well?! Fortunately enough we can create what is needed in the mgmt shell.
Definitely. Thanks for the ping back from your site!