Url rewriting in HttpHandler

by dee 24. January 2008 03:10

Make the following:

public void ProcessRequest(HttpContext context)
{
    HttpRequest request = context.Request;
    context.RewritePath("new url");
    IHttpHandler handler = PageParser.GetCompiledPageInstance("page which should handle request", null, context); // Page name should be like "Default.aspx". Without url parameters!
    handler.ProcessRequest(context);
}

IIS and Url Rewrite module

by dee 2. January 2008 20:25

To enable IIS to work with custom .Net Url Rewrite module it's needed to do following: open "Properties" of web site -> "Home Directory" tab -> "Configuration" button. Click on "Insert" button which is located under "Wildcard application maps" label. You should point "Executable" to aspnet_isapi.dll and clear "Verify that file exists" checkbox.

Powered by BlogEngine.NET 1.4.0.0
Theme by Mads Kristensen