Following problem:

I have an asp.net application that runs on www.example.com. (the app
lies in the root folder of iis server)

I have a second asp.net application that needs to be accessible by
typing www.example.com/app2.

App2 is a full fledged application, with a own /bin folder,
web.config file etc.

Currently, I have set up app2 as a virtual folder in the root folder
of app1 and it works sort of - I need to put the compiled .dll file
(both apps are .net 1.1 applications) of app1 into the /bin folder of
app2, alongside with the .dll of app2 of course.. Otherwise, it won't
work. (A failure message about the web.config will come up)

So, is there a better way to accomplish this? I thought, that maybe I
should define app2 as a own website, but the requirement still
persists, that it needs to be accessed by typing example.com/app2. I
haven't found a way to do this. I tried to create a folder in the root
folder of example.com, calling it app2, and somehow redirect it to the
website app2, but it doesn't work. (Note: with "website" I mean the
IIS 6 entity: http://www.simongibson.com/intranet/iis6/images/Image06.gif
not a "real" website).

Is it possible to redirect a folder or virtual folder to a IIS 6
website (website as in: http://www.simongibson.com/intranet/iis6/images/Image06.gif),
and note: this website shall not be accessible by a host header or
direct IP address, but only by the redirection, i.e.: www.example.com/app2

Re: Virtual Folder to website redirection? by Daniel

Daniel
Fri Feb 29 11:26:41 CST 2008

PSiegmann@mail.nu wrote on Thu, 28 Feb 2008 15:30:47 -0800 (PST):

> Is it possible to redirect a folder or virtual folder to a IIS 6
> website (website as in:
> http://www.simongibson.com/intranet/iis6/images/Image06.gif), and note:
> this website shall not be accessible by a host header or direct IP
> address, but only by the redirection, i.e.: www.example.com/app2

A redirection requires that the new location be sent back to the browser,
and the browser access it directly. As that appears to not be what you want,
you'd need to look into setting a reverse proxy for that URL (the proxy
server takes requests from browsers, communicates with the "hidden" server,
and sends the results back to the browser). This isn't something that IIS6
itself can do.

--
Dan



Re: Virtual Folder to website redirection? by David

David
Sat Mar 01 04:42:07 CST 2008

On Feb 28, 3:30=A0pm, PSiegm...@mail.nu wrote:
> Following problem:
>
> I have an asp.net application that runs onwww.example.com. (the app
> lies in the root folder of iis server)
>
> I have a second asp.net application that needs to be accessible by
> typingwww.example.com/app2.
>
> App2 is =A0a full fledged application, with a own /bin folder,
> web.config file etc.
>
> Currently, I have set up app2 as a virtual folder in the root folder
> of app1 and it works sort of - I need to put the compiled .dll file
> (both apps are .net 1.1 applications) of app1 into the /bin folder of
> app2, alongside with the .dll of app2 of course.. Otherwise, it won't
> work. (A failure message about the web.config will come up)
>
> So, is there a better way to accomplish this? I thought, that maybe I
> should define app2 as a own website, but the requirement still
> persists, that it needs to be accessed by typing example.com/app2. I
> haven't found a way to do this. I tried to create a folder in the root
> folder of example.com, calling it app2, and somehow redirect it to the
> website app2, but it doesn't work. (Note: with "website" I mean the
> IIS 6 entity:http://www.simongibson.com/intranet/iis6/images/Image06.gif
> not a "real" website).
>
> Is it possible to redirect a folder or virtual folder to a IIS 6
> website (website as in:http://www.simongibson.com/intranet/iis6/images/Ima=
ge06.gif),
> and note: this website shall not be accessible by a host header or
> direct IP address, but only by the redirection, i.e.:www.example.com/app2


You are looking for how to configure "nested" ASP.Net applications --
which would an ASP.Net concept. You should search for your question at
sites like www.asp.net or ASP.Net dedicated forums.

There really isn't anything related to IIS, redirection, etc in your
question. There is no such thing as the "website" that you are talking
about because by definition a website is named by host header or
direct IP address, so I recommend against going down that path. Just
figure out how to nest ASP.Net applications and you'll be fine.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//