I was helping a good friend of mine recently with his Exchange 2013 server. When he logged into Outlook Web App he would get the “Something went wrong” internal server error.
Unfortunately, this is an incredibly generic error that can be caused by a variety of different problems. We decided to hit the Event Logs. Almost instantly we ran across several occurrences of this error.
ASP.NET Event ID 1309 Event Code 3005 Event code: 3005 Event message: An unhandled exception has occurred. Event time: 6/1/2015 7:00:00 PM Event time (UTC): 6/1/2015 11:00:00 PM Event ID: 4d1bb9b639774fd689f5b1eeec309375 Event sequence: 2 Event occurrence: 1 Event detail code: 0
Sadly, ASP.NET Event ID 1309 is a very generic message. In fact, Event Code 3005 could be caused by any number of possibilities. Ruling the Event Code out we examined the rest of the error. We quickly found our answer in the Exception Message. I’ve highlighted the section below.
Application information: Application domain: /LM/W3SVC/2/ROOT/owa Trust level: Full Application Virtual Path: /owa Application Path: E:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\ Machine name: EX13-01 Process information: Process ID: 15216 Process name: w3wp.exe Account name: NT AUTHORITY\SYSTEM Exception information: Exception type: HttpException Exception message: The file or directory is corrupted and unreadable. ...edited for brevity... The file or directory is corrupted and unreadable. ...edited for brevity... Request information: Request URL: https://ex13-01.skaro.local:444/owa/ Request path: /owa/ User host address: fe80::31fa:8d7a:8000:d1d3 User: Is authenticated: False Authentication Type: Thread account name: NT AUTHORITY\SYSTEM ...edited for brevity...
So, we had corruption. Not good!
However, the corruption was not located in the Application Path listed in the error above. But instead in the .NET caches located under the Windows folder. Thankfully the fix is quite simple.
Fix the Corruption
Navigate to the following folder on your Exchange server.
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
All files located in this folder are cached .NET files. For our particular issue the corruption was one folder deeper — OWA.
Go to Start >> Administrative Tools >> Services. From the Services MMC, right-click the WWW Publishing Service and select Stop from the context menu.
Once stopped, delete all files located under the OWA subfolder. Don’t worry, the next time you log into OWA these files are regenerated.
Restart the WWW Publishing Service.
Once we did this we were able to log into Outlook Web App successfully.
Not finished yet
If you do run into this problem (and hopefully this fixes it) there is still one important question to ask; what caused your corruption in the first place?
For us it was a storage problem. But any time you encounter any kind of corruption its always best to perform a root cause analysis. Check your logs. Use the tools from your hardware vendor. Be sure to find the cause before it becomes a much bigger problem — like data loss.
How about you? Have you experienced the dreaded ASP.NET 1309? What was your exception message and fix? Drop a comment below.