I have created the handler to process .html pages in my asp.net c# web application.
I also use url rewriting concepts.
Handler works fine when any html requrest come to server/website.
Coding details are as follows:
web.config Handler Code:
<add verb="*" path="*.html," validate="false" type="MyProject.ContentHandler,MyProject" />
ContentHandler.cs Code:
public void ProcessRequest(HttpContext context)
{
string strMapPage = string.Empty;
if (context.Request.Url.ToString().Contains("category"))
{
strMapPage = "/Links.aspx?ID=" + ProducID;
}
else
{
strMapPage = context.Request.Url.ToString();
}
context.Server.Transfer(strMapPage);
}
This method works fine for any .html request like for this page http://localhost:9111/user-category-1.html
But when i try to open the page like '/JS/TinyMCE/imagemanager/index.html'
It throws the error "Error executing child request for /JS/TinyMCE/imagemanager/index.html"
How to solve this problem?