HttpHandlers in ASP.NET
I just started playing around with HTTP Handlers in ASP.NET for the first time. A couple of observations:
1) The stuff is rather under-documented. In VS2002, it was practically undocumented. Things seemed to have improved a bit in VS2003. Now, I'm not saying that there not good info out there. Fritz's book covers it, as does Nikhil's, and I'm sure there's other stuff out there. But the info in the .NET framework docs themselves, which is the first place I always go, is pretty thin. Case in point - search the framework docs for "webhandler" (the ashx file directive). Nary a reference to be found. It is mentioned in a couple of MSDN articles though.
2) So far every ASHX discussion and sample I've seen shows the code for the HTTP handler directly in the ASHX file. This was so consistent it made me wonder if ASP.NET even supported the code-behind model for ASHX files. A little experimenting showed that it does - just reference the code-behind class in the Class attribute of the WebHandler directive.
I don't know why nobody mentions this. Especially since VS.NET seems to know nothing about ASHX files. When you're coding in one, you lose all syntax coloring, intellisense, automatic formatting, etc. Not terribly pleasant.