Virtual Paths and HttpModules

  • Thread starter Thread starter Ian Turner
  • Start date Start date
I

Ian Turner

Hi,

Is there anyway, without dropping back to C++ and ISAPI filters, whereby I
can route requests to virtual url paths through to the ASPNET runtime and
ultimately processed by an HttpModule?

Let me give you an example:

If I have an website in IIS with host-header of www.mysite.com, no actual
content (html, aspx, subfolders etc) but a Global.asax and a web.config
file, is there any way that I can get requests to www.mysite.com/foo/bar to
be picked up by the runtime and passed through the Global.asax?

The idea is that foo/bar is a virtual path that the application could decide
what to do with. Ultimately, this will not be an empty website - it will
have a number of template aspx pages - but the need for virtual paths
remains the same.

I've tried setting up wildcard application mappings but had no luck so far.
If anyone could offer any assistance or guidance, that would be great.

Cheers
Ian
 
My solution is alternative.

I'm implement IHttpHandler, register it, and under ProcessRequest do
RewritePath.

Postback errors avoided by modifying "action" string in pages.
 
Back
Top