How to deploy 2 distinct ASP.NET apps with one in V.Dir and one in site root

N

news.microsoft.com

I have two completely distinct ASP.NET (2.0) web applications. They share no
code, they have distinct web.config files, they don't even link to each
other. During development, they have lived happily side by side in two
virtual directories in the same IIS website.

e.g. http://localhost/dotnetnuke
and http://localhost/mobilephoneapp

Now they are ready to be deployed to a production webserver (IIS 6.0). I
want the first app to be run through the site root and the second to be run
through a virtual directory:

e.g. http://www.company.co.uk <--- this is the dotnetnuke app
and http://www.company.co.uk/phone <--- this is the mobilephoneapp app

My problem is, with this setup, the mobilephoneapp uses the web.config of
the dotnetnuke app, because dotnetnuke is in the root of the site. How can I
make them live as distinct applications again, but keep the address of the
dotnetnuke app as http://www.company.co.uk?

FYI, I know I might be able to accomplish this by creating two IIS websites,
but the server only has 1 IP address.
 
N

news.microsoft.com

Yes, at least I think so. In IIS the phone app is in a Virtual Directory
called "phone" and if I look at the properties of the Virtual Directory, the
Application Name is MobilePhone, whereas the website root has an Application
Name of DotNetNuke.
 
H

Hans Kesting

I have two completely distinct ASP.NET (2.0) web applications. They share no
code, they have distinct web.config files, they don't even link to each
other. During development, they have lived happily side by side in two
virtual directories in the same IIS website.

e.g. http://localhost/dotnetnuke
and http://localhost/mobilephoneapp

Now they are ready to be deployed to a production webserver (IIS 6.0). I
want the first app to be run through the site root and the second to be run
through a virtual directory:

e.g. http://www.company.co.uk <--- this is the dotnetnuke app
and http://www.company.co.uk/phone <--- this is the mobilephoneapp app

My problem is, with this setup, the mobilephoneapp uses the web.config of
the dotnetnuke app, because dotnetnuke is in the root of the site. How can I
make them live as distinct applications again, but keep the address of the
dotnetnuke app as http://www.company.co.uk?

FYI, I know I might be able to accomplish this by creating two IIS websites,
but the server only has 1 IP address.

You can have two applications for the same IP address, using different
hostnames.
www.company.co.uk your dotnetnuke app
phone.company.co.uk your mobilephone app

And the apps can live in different directories. No need to have your
phone app in a physical subdirectory of your root.
Now that I think of that, maybe that's also a solution: install your
phone app in a directory *next to* the root-app (instead of below it)
and have a virtual directory from the root point there.

Hans Kesting
 
L

Laurence Neville

I didn't follow what you said:
install your
phone app in a directory *next to* the root-app (instead of below it)
and have a virtual directory from the root point there.
.... but the method for creating multiple sites on 1 IP sounds promising.
This is using the 'host headers' function in IIS to distinguish different
sites on the same IP right?
 
H

Hans Kesting

I didn't follow what you said:
... but the method for creating multiple sites on 1 IP sounds promising.
This is using the 'host headers' function in IIS to distinguish different
sites on the same IP right?

Correct, host headers let you have multiple "root sites" on a single
IP-address/IIS

and with installing "next to" I meant:
install the root-app in D:\websites\root
and the phone-app in D:\websites\phone

(and maybe add a virtual directory to the root-app, pointing to phone)
 
H

Hans Kesting

OK thanks, but is there any way to have both applications live within the
same site, like this?

e.g. http://www.company.co.uk <--- this is the dotnetnuke app
and http://www.company.co.uk/phone <--- this is the mobilephoneapp app

Doesn't using host headers mean that each root site must have a separate
host name?

Laurence

True.
Try for a "mixed" solution: install the apps in side-by-side
directories
(I *think* that the merging of web.config's goes by *physical*
directory
hierarchy) and have a virtual directory in "root" point to "phone".

Hans Kesting
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top