in our website there is just one link that needs to be rewritten. The application is working on .NET 2.0. Since it's just one link i want this to be done with httphandlers. So i've added new class implementing IHttpHandlerFactory to App_Code.
public class EventRewriter : IHttpHandlerFactory
public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated)
string path = context.Server.MapPath("Event.aspx");
return PageParser.GetCompiledPageInstance("Event.aspx", path, context);
public void ReleaseHandler(IHttpHandler handler)
In other words - the user has ability to define his own virtual path. That path always should be rewritten to the same physical aspx file. Sounds like such a simple task to do. The user might define his path like .../xxx/yyy . I'm silently adding ".prx" extension to the link - therefore i can easily run httphandler for such extension. I've added appropiate markup to web.config so my class was used everytime someone clicks on link with such extension. And it seems to work. Everytime user clicks on link with .prx - the code execution breakpoints inside GetHandler method. The p
View Complete Post