locked
explination of the handler.ashx RRS feed

  • Question

  • User59752322 posted

    Just downloaded this and started to play -- I REALLY like the photo handling and want to canabalize it for a site I'm working on, but I really don't understand what/how the handler.ashx works, how its called, etc (probably because I've yet to use a ashx! [:)]) If someone would explain how this works, I would appreciate it!

    Monday, July 31, 2006 11:06 AM

All replies

  • User160031809 posted

    When i started learning about .ASHX file , i found this piece of information.

    Its not exactly answer your question but might help you.

     

    ASP.NET has a little know feature that allows you to easily implement what is known as HTTP Handler.

    Basically, when a request for a page comes into ASP.NET, eventaully that request is handled by an object that implements IHttpHandler interface .

    This interface includes a method called "ProcessRequest" that is reasponsible for writing all of the page content to the HttpContext.Response.Output stream.

    ASHX files allows you to easily write IHttpHandler class without even having to pre-compile it.

     

    Monday, July 31, 2006 2:24 PM
  • User59752322 posted

    It does help -- so what are the advantages?  I've kind of started to figure it out, I've just learned how to write things differently
    [*-)]

    Monday, July 31, 2006 2:38 PM
  • User160031809 posted

    Some more piece of information :

     

    .ASHX file  works just like an aspx file except you are one step back away from the messy browser level where HTML and C# mix.

    One reason you would write an .ASHX file instead of an .ASPX file is that your output is not going to a browser but to an xml consuming client of some kind.

    Monday, July 31, 2006 2:38 PM
  • User-166847701 posted

     

    You can find more details in this site....

    http://www.brainbell.com/tutorials/ASP/TOC_Tutorial_18.html

    [:)]

    Monday, December 29, 2008 12:43 AM
  • User-1171043462 posted

    I used ASHX files for Cross Domain Calls Like Yahoo API and Delicious which use JSON and and CallBacks for Cross Domain Calls. So when I had a requirement of building something I use ASHX i.e Handler to achieve the same in .Net

    Monday, December 29, 2008 1:05 AM