We comes across scenarios where we need to build Custom HTTP handlers, ASP.NET calls this HTTP Handler in order to serve a specific request for resources that have a particular extension. Registering a HTTP Handler depends with the versions of IIS. All of us might have looked at the Web.config file which contains the sections
Let’s walkthrough on registering the handlers in IIS 6.0 & earlier versions and IIS 7 & later versions. Basically
HTTP Handler for IIS 6.0:
We need to add the handler reference under the
The task is not yet completed yet as you need to configure the same in IIS as well. Here you can see that if a request comes for any file with extension .MyFileExtension , it gets route to the MyFile class placed inside the App_Code folder.
HTTP Handler for IIS 7.0:
The main difference in adding handlers in IIS 7.0 is that you need to add the reference under the
Here scriptProcessor refers to the actual path to the aspnet_isapi.dll file.
· If we are running IIS in Classic mode, you need to enter the reference in both sections like
· If we are running IIS in Integrated mode, you need just to enter the reference only in
I think, now we could also register programmatically.
ReplyDeleteTa,
Rajeesh