Internal Server Error with httpHandlers section of web.config

Today I encountered titled error when I was deploying IIS6 hosted application on IIS8. On browsing the application all it displayed me is 404 page and I was not able to run the debugger to check the application code.

Internal Server Error with httpHandlers section of web.config

After hours of struggle I found the solution, and would like to share it with you.

The issue was with Web.config httpHandler settings. Here is the configuration settings I was using on IIS6.

      <!-- Handler for School Details -->
      <add verb="*" path="vp/*.aspx" validate="false" type="eBellUI.Custom.eBellPageHandler, eBell.UI" />

Now, IIS7+ uses <system.webServer\handlers> instead of the IIS6 <httpHandlers> section. So, this will throw an error by default if you have the settings in the older way.

    <validation validateIntegratedModeConfiguration="false" />
      <add name="eBellPageHandler" verb="*" path="vp/*.aspx" type="eBellUI.Custom.eBellPageHandler, eBell.UI" />

The validateIntegratedModeConfiguration="false" will allow you to keep your httpHandlers section populated without throwing an error (useful if you are debugging on a cassini / iis6 server) and the entry in the <handlers> section will configure it for your IIS7 server.

Hope this helps you to save time.


Popular posts from this blog

Lambda two tables and three tables inner join code samples

Migrating database from ASP.NET Identity to ASP.NET Core Identity