Virtual Paths and HttpModules

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
 
D

Dmitry Andreev

My solution is alternative.

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top