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.
Tip: Exchange MVP Jeff Guillet identifies another cause of Code 3005 in this article.
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.
Warning: You will need to schedule downtime for this server as the remediation requires you to stop the WWW Publishing Service
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 it’s 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.
Thanks, we had a similar issue with similar event log errors. In our case it was the EWS directory that was corrupted, but the fix was the same.
I know this is an old thread, but here’s what I’m getting. Tried a few posted resolutions I found online, but to no avail:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/14/2019 10:16:43 AM
Event time (UTC): 2/14/2019 6:16:43 PM
Event ID: c5a0882ef6e14d9a8f6136de0ba199c2
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/PDFTest-1-131946418019181031
Trust level: Full
Application Virtual Path: /PDFTest
Application Path: C:\inetpub\wwwroot\PDFTest\
Machine name: BIGBLACK
Process information:
Process ID: 556
Process name: w3wp.exe
Account name: IIS APPPOOL\PDFTest
Exception information:
Exception type: HttpException
Exception message: Session state has created a session id, but cannot save it because the response was already flushed by the application.
at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded)
at System.Web.SessionState.SessionStateModule.CreateSessionId()
at System.Web.SessionState.SessionStateModule.DelayedGetSessionId()
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
at System.Web.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Any help would be apreciated….. New install exchange 2016 CU6
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 7/18/2017 1:09:11 PM
Event time (UTC): 7/18/2017 4:09:11 PM
Event ID: 4c87bd28ef5449978a7aa792acb708eb
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT/owa-1-131448677372603496
Trust level: Full
Application Virtual Path: /owa
Application Path: E:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\owa\
Machine name: servername
Process information:
Process ID: 9312
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM
Exception information:
Exception type: HttpException
Exception message: The performance counter process DSAccess should never be initialized as Single and Multiple instance type.
at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
The performance counter process DSAccess should never be initialized as Single and Multiple instance type.
at Microsoft.Exchange.Data.Directory.Globals.IsPerfCounterInstanceInitialized(String applicationName, Boolean hasMultiInstance)
at Microsoft.Exchange.Data.Directory.Globals.InitializePerfCounterInstance(String applicationName, Boolean hasMultiInstance, Action`1 logStage)
at Microsoft.Exchange.Clients.Owa2.Server.Core.BaseApplication.ExecuteApplicationStart(Object sender, EventArgs e)
at Microsoft.Exchange.Clients.Owa2.Server.Core.Global.Application_Start(Object sender, EventArgs e)
Request information:
Request URL: https://localhost:444/owa/exhealth.check
Request path: /owa/exhealth.check
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM
Thread information:
Thread ID: 13
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app)
at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
Custom event details:
Thanks for this. Ran into the same issue for ActiveSync. This resolved it by deleting the same cache, only in the EAS folder.
Awesome. Glad you got it resolved. Any idea how the corruption occurred in the first place. Last time I had this issue was a SAN problem.
i has a same error with event id 1309 and event code 3006,but for me owa and ECP works file but active sync stops working,users do not get connected to active sync ,is this issue related with this below is full error.
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 1/17/2016 3:31:43 PM
Event time (UTC): 1/17/2016 11:31:43 AM
Event ID: 351bdd8f94af42b38958765e675a3eac
Event sequence: 464
Event occurrence: 3
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/Autodiscover-1-130974953306519679
Trust level: Full
Application Virtual Path: /Autodiscover
Application Path: E:\Exchange Files\FrontEnd\HttpProxy\Autodiscover\
Machine name: LMAEHA2
Process information:
Process ID: 39152
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM
Exception information:
Exception type: HttpException
Exception message: A potentially dangerous Request.Path value was detected from the client (&).
at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)
Request information:
Request URL: https://outlook.mapa.com:443/autodiscover/P&SCrecruitment..mapa.com/autodiscover.xml
Request path: /autodiscover/P&SCrecruitment..mapa.com/autodiscover.xml
<#moderator edited for brevity>
Hey Tom,
This appears to be somewhat related. Seems like there is an issue with your Autodiscover path. It is referencing: https://outlook.mapa.com:443/autodiscover/P&SCrecruitment..mapa.com/autodiscover.xml
Your autodiscover path should look similar to: https://autodiscover.yourdomain.com/autodiscover/autodiscover.xml
Hope you don’t have a virus. Good luck!