JG Vimalan's Blog

It is all about coding!

httpHandlers vs handlers in web.config

One of my colleague told to me that, the http handlers he created are working in his development system and not in QC environment. From his statement I understood that there is an environment difference.

When I looked at his system, it is Windows Server 2003 and the QC environment is Windows Server 2008 R2. So, the problem is because of the difference in IIS version and in registering the http handlers.

Windows Server 2003 is IIS 6 and Windows Server 2008 R2 is IIS 7.5. So, in the web.config file, the http handlers should be registered in two locations,

a. <httpHandlers> for IIS 6


<add verb=”*” path=”Update.ashx” type=”DemoProject.WebUI.Handlers.Update, DemoProject.WebUI”/>

b. <handlers> for IIS 7 and above


<add name=”Update” path=”Update.ashx” verb=”*” type=”DemoProject.WebUI.Handlers.Update” resourceType=”Unspecified” preCondition=”integratedMode” />

this will solve the problem.


July 31, 2011 Posted by | ASP.NET | 2 Comments