HttpModule not working to mimic subdirectories, what to do then ?
Posted on 2005-04-23
I'm writing an HttpModule in order to replace the parameters in the
aspx pages to look like subdirectories.
i.e. instead of having :
I want to have :
While I was testing the functionality of HttpModule I was redirecting
from an ".aspx" file and it all was working fine.
Now that I switched to the real functionality, it just don't hit the
I mean, the call to "myexample.com/cat1/cat2/" does not fire the
application request in my HttpModule.
Here is my code :
private void Application_BeginRequest(Object source,
HttpApplication application = (HttpApplication)source;
HttpContext context = application.Context;
string myPath = context.Request.
string strs = ExtractParams(myPath);
if (strs.Length == 2)
vendor = strs;
category = strs;
Now, if I put a break in the first line I see that the code is not even
hit when I have something like "myexample.com/cat1/cat2/". It was
working if I have "myexample.com/cat1.aspx".
I guess I need to configure something, somewhere to call this code when
calling an URL with directories.
Thanks in advance.