Httpmodule With Server.transfer

  • Please log in to reply
No replies to this topic

#1 endapally


    New Member

  • Members
  • Pip
  • 1 posts

Posted 20 July 2010 - 01:32 PM

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() { }


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users