M
Matt Winward
Hi all.
If anyone can solve this problem, I'd be very grateful.
I've put together a web application that will run within a virtual
directory and uses an HttpHandler to parse requested URLs and loads a
different page in the background, depending on the URL requested.
So http://www.domain.com/VirtualDirectory/<<Customer>>/ actually loads
http://www.domain.com/VirtualDirectory/Default.aspx with some query
string info. So each of the customer subfolders don't really exist ...
they're just used to load content managed sites. The same goes for
each page name ... the handler looks up the customer and the page in
the database and tells Default.aspx to load the right content.
This works great.
But now I want to use an HttpModule at the top level so that
http://www.domain.com/<<Customer>> uses a UrlRewrite to actually load
http://www.domain.com/VirtualDirectory/<<Customer>>/.
This essentially works, but unfortunately it effectively is still
working out of the top level directory, so it's looking for my
assemblies (like the handler, for instance) in /bin rather than in /
VirtualDirectory/bin.
Is there any way I can do a UrlRewrite and effectively transfer
everything over to the web application, rather than it all still being
handled by the parent application? I gather that if I had IIS 7
available to me I could use Server.TransferRequest, which I believe
might make all the difference, but I'm only guessing ... and I can't
use IIS 7 at the moment!
Any ideas would be great. At the moment my only option is to move the
web app to the root folder so that all DLLs are in the top level bin
folder... I'd just have to give it a subfolder and renamed some files
and redo the handler extensions. But I'd rather not do that if there's
a more elegant solution.
Thanks in advance,
Matt
If anyone can solve this problem, I'd be very grateful.
I've put together a web application that will run within a virtual
directory and uses an HttpHandler to parse requested URLs and loads a
different page in the background, depending on the URL requested.
So http://www.domain.com/VirtualDirectory/<<Customer>>/ actually loads
http://www.domain.com/VirtualDirectory/Default.aspx with some query
string info. So each of the customer subfolders don't really exist ...
they're just used to load content managed sites. The same goes for
each page name ... the handler looks up the customer and the page in
the database and tells Default.aspx to load the right content.
This works great.
But now I want to use an HttpModule at the top level so that
http://www.domain.com/<<Customer>> uses a UrlRewrite to actually load
http://www.domain.com/VirtualDirectory/<<Customer>>/.
This essentially works, but unfortunately it effectively is still
working out of the top level directory, so it's looking for my
assemblies (like the handler, for instance) in /bin rather than in /
VirtualDirectory/bin.
Is there any way I can do a UrlRewrite and effectively transfer
everything over to the web application, rather than it all still being
handled by the parent application? I gather that if I had IIS 7
available to me I could use Server.TransferRequest, which I believe
might make all the difference, but I'm only guessing ... and I can't
use IIS 7 at the moment!
Any ideas would be great. At the moment my only option is to move the
web app to the root folder so that all DLLs are in the top level bin
folder... I'd just have to give it a subfolder and renamed some files
and redo the handler extensions. But I'd rather not do that if there's
a more elegant solution.
Thanks in advance,
Matt