Hi
I have a HTTPMODULE which is used to transfer from Ugly URL to other URL. But the Ugly URL should be shown. So I am using Server.Transfer.
But when I do a Server.Transfer like context.Server.transfer("../DtssHomePage/DtssHomePage.aspx?PageID=29&activity=football", true);
I'm getting Error executing child request for ../DtssHomePage/DtssHomePage.aspx and inner exception message has Exception of type
'System.Web.HttpUnhandledException' was thrown. Can we use query string for server.transfer like above? Find below for my HTTP Module.
public class HTTPModule : IHttpModule
{
public void Init(HttpApplication application)
{
application.BeginRequest += new EventHandler(this.Application_BeginRequest);
}
private void Application_BeginRequest(Object source,
EventArgs e)
{
HttpApplication app;
string requestUrl;
app = source as HttpApplication;
requestUrl = HttpContext.Current.Request.Url.AbsoluteUri;
HttpContext context = app.Context;
context.Server.transfer("../DtssHomePage/DtssHomePage.aspx?PageID=29&activity=football", true);
}
}
public void Dispose() { }
}
}
Thanks












