Click here to Skip to main content
16,009,631 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to know what is a web handler,What is the use of that and also what is .ashx format files?
I couldn't find the good explanation in google.
Can any one please simply explain this?
Posted
Updated 22-Oct-12 1:22am
v2

1 solution

The reason you probably can't find it in google is the terminology is wrong.

Try searching for Http Handler.

The following article describes the ASP.Net request architecture. This will give you a good idea about where Http Handler fall in the wider picture of ASP.Net.

ASP.NET Internals: Request Architecture[^]

A HttpHandler in ASP.Net is a class which conforms to the IHttpHandler interface. Each page request generally has an extension, ASPX, HTML, JPG and as you point out ASHX. When the web server receives a request it looks at the file extension and then tries to map this to the list of handlers registered in IIS.

The following explains how to view and manage the HTTP Handlers in IIS. You'll see they already exist for many of the common web extensions.

http://msdn.microsoft.com/en-us/library/bb515343(v=vs.100).aspx[^]

An ASHX file is a Generic Handler. A way of implementing a HttpHandler in ASP.Net.

You don't have to use ASHX files to create handlers. There are other ways by implementing the IHttpHandler interface is your own classes. But if you're specifically interested in ASHX then the following is a tutorial.

http://www.dotnetperls.com/ashx[^]
 
Share this answer
 
Comments
fjdiewornncalwe 22-Oct-12 9:41am    
+5. Nice.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900