IHttpAsyncHandler in Ajax.NET Professional

Michael Schwarz on Friday, October 21, 2005

In the next version I'm using the IHttpAsyncHandler instead of the synchronous handler IHttpHandler. The request now will run in a separate thread that cannot access the HttpContext.Current object. For this reason you have to implement the IContextInitializer interface to get the HttpContext in your class:

public interface IContextInitializer { void InitializeContext(HttpContext context); }

You can read about the problems with IHttpHandler and long running methods at the .NET Dashboard [1]. Applications like the chat will run better and with less used resources on the server.