473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Virtual Paths and HttpModules

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
Nov 17 '05 #1
1 1309
My solution is alternative.

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

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

--
Dmitry Andreev. MCSD.NET
"Ian Turner" <it********@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP12.phx.gbl...
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
11
by: Markus Kling | last post by:
Hi, I have a web application that has two sub-applications. The root application defines two httpModules which shall not be loaded for the subapplications. I tried to achieve this by adding ...
1
by: SirPyros | last post by:
I am working on a web application, for which i created a custom ihttpmodule to handle authentication. I am creating another application in a virtual directory under this one. But when I try to run...
3
by: Tom Hartland | last post by:
(Summary: is there a way to convert virtual paths to physical paths using PHP on IIS?) I hope I'm not covering old ground, but I've spent a couple of hours looking for this information and have...
3
by: Dhruba Bandopadhyay | last post by:
In classic ASP I could write: <!-- #INCLUDE VIRTUAL="Kevin\General\ServiceClass.asp" --> and it would "include" that ASP file into the current ASP file. My web application folder was not...
8
by: JJ | last post by:
I'm confused about paths. I have a functionn that uses the mappath method, which I think requires a virtual path (is that the same as a relative path?). But this doesn't always work as the...
2
by: tshad | last post by:
I have set up a Virtual Directory underneath my normal Web Site in IIS 6 for 2 of our sites. One of them works file. The other one is giving me an error:...
0
by: Tim Payne | last post by:
hi, I have a site that is being moved to a virtual sub-folder. I've set up the new version of the site for testing, and created a virtual directory in IIS that points to the old site (so that I...
4
by: tshad | last post by:
I have a site www.stf.com and a site www.stfstage.com (where I do all my testing). The problem is that www.stfstage.com is only internal and I need to get access from the outside (without...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.