T
Thedotnetteer
hi.
I wrote a very simple httpmodule to transform calls as
www.mysite.com/users/john
to
www.mysite.com/userspage.aspx?id=john
the problem is that my module is called only when the called page has an
..aspx extension (or an extension which is associated with aspnet), thus
making the module unuseful.
in the MSND article
"Intercept, Monitor, and Modify Web Requests with HTTP Filters in ISAPI
and ASP.NET " Panos Kougiouris says that, since IIS looks at file
extensions to redirect calls, if not provided with a file extension, the
only possible way to do the rewriting is using ISAPI filters.
I hope this is not true.
the module has been registered correctely, and it's simple structure is
liek the following.
I am sure it's easy, can somebody please help?
tnx.
public void Init(System.Web.HttpApplication Appl)
{
Appl.BeginRequest+=new System.EventHandler
(MyBeginRequest);
}
public void MyBeginRequest(object sender, System.EventArgs
args)
{
System.Web.HttpApplication APP=
(System.Web.HttpApplication)sender;
APP.Context.RewritePath(.....);
}
I wrote a very simple httpmodule to transform calls as
www.mysite.com/users/john
to
www.mysite.com/userspage.aspx?id=john
the problem is that my module is called only when the called page has an
..aspx extension (or an extension which is associated with aspnet), thus
making the module unuseful.
in the MSND article
"Intercept, Monitor, and Modify Web Requests with HTTP Filters in ISAPI
and ASP.NET " Panos Kougiouris says that, since IIS looks at file
extensions to redirect calls, if not provided with a file extension, the
only possible way to do the rewriting is using ISAPI filters.
I hope this is not true.
the module has been registered correctely, and it's simple structure is
liek the following.
I am sure it's easy, can somebody please help?
tnx.
public void Init(System.Web.HttpApplication Appl)
{
Appl.BeginRequest+=new System.EventHandler
(MyBeginRequest);
}
public void MyBeginRequest(object sender, System.EventArgs
args)
{
System.Web.HttpApplication APP=
(System.Web.HttpApplication)sender;
APP.Context.RewritePath(.....);
}