How to debug 500.0 / 0x00000000 error on System.Web.Mvc.MvcHandler

5

I'm getting this strange error which I am unable to figure out. Running on Windows 8.1, IIS 8.5. The site runs fine on Microsoft Azure so it must be a local configuration issue. I get the same errors in IIS Express as I do with IIS.

The problem has been around for a few days and it's driving me mental. I can't even test simple CSS/Content changes (which is what I am trying to do) without pushing them up to Azure each time to check.

ERROR:

Module          global.asax
Notification    EndRequest
Handler         System.Web.Mvc.MvcHandler
Error Code      0x00000000
Requested URL   https://localhost:443/
Physical Path   C:\inetpub\wwwroot\dev\
Logon Method    Anonymous
Logon User      Anonymous
Request Tracing Directory C:\inetpub\logs\FailedReqLogFiles

Here is the trace for the section just before the warning.

THINGS I'VE TRIED

  • Reinstall IIS, .NET 4.5, Visual Studio
  • Checked permissions: IIS_IUSRS has access to the folder and files
  • Installed a basic MVC 5 demo app. Runs perfectly under the website & app-pool in question.
  • Put a basic aspx hello world page in the root of my website directory. It loads when in the Default web site, but when under the website in question I get a "PageHandlerFactory-Integrated-4.0" error.
asp.net-mvc
iis
iis-8
asked on Stack Overflow Apr 6, 2014 by Carl • edited Apr 7, 2014 by Carl

5 Answers

2

I was struggling with this same error message and I couldn't get any tracing or logging to happen. After days of research I realized it was an unhandled exception in Global.asax.cs. I would recommend auditing your Global.asax code to see if there is any opportunity for exceptions to happen.

Regardless, you might want to follow the best practice to handle such Application-level errors to output the last error message to a custom page:

http://msdn.microsoft.com/en-us/library/vstudio/24395wz3(v=vs.100).aspx

answered on Stack Overflow Jun 18, 2014 by zemien
1
  • comment out all you code inside Global.asax.cs Application_Error method

answered on Stack Overflow Oct 22, 2015 by Omu
0

I strongly believe that your application pool is a bit misconfigured. Try to set proper version of .Net framework as proposed in MSDN.

answered on Stack Overflow Apr 6, 2014 by (unknown user)
0

For me, the issue ended up being when the View of the page I was browsing hit a Property in the ViewModel that loaded some additional stuff... and that stuff hit some bad data... and because it was the View that hit that Property, instead of showing the actual error, it instead showed the generic 500 error... to fix, I just added this statement at the top of the View:

@{ return; }

And when the error went away, I kept moving the above statement lower and lower until I found which line caused the error.

answered on Stack Overflow Sep 2, 2020 by Serj Sagan
0

I found the detailed error on Event Viewer -> Windows Logs -> Application

Turns out my AppPool user didn't had access to the database

answered on Stack Overflow Jan 11, 2021 by ariel

User contributions licensed under CC BY-SA 3.0