One web.config, for multiple domains

L

Ludvig

I have various domains using the same application/assembly

They differ in contents and design, based on a "site id", and get its
information from an SQL server.

Now I have to deploy the different "sites" to individual folders on the
server, and set up the domains on IIS to point to these folders.
If I do changes in the application, I have to deploy to all the different
folders on the server.

What I want to do is to have one single root web, and let all the domains
point to this in IIS.
Then I have to deploy only once.

The problem is. How do I configure web.config, to allow me to use multiple
domains, sharing a common application and root folder.
 
P

Patrice

You could use a virtual root below your main directory and keep a main
directory. That said I would still question the expected benefits.

Is deployement that hard ? Y'oull have now all of your sites tireds...

Patrice
 
L

Ludvig

No, deployment isn't that hard, but when the number of sites using the same
application increases, the advantage is clear.

I'm not sure I understood the use of virtual root.



So, there is no way to configure this in web.config, then??
 
J

Juan T. Llibre

re:
The problem is. How do I configure web.config,
to allow me to use multiple domains, sharing a
common application and root folder.

Actually, web.config has nothing to do with that.

You can have as many web.configs as
there are subdirectories of your application.

What you want to do is configure one application
to serve as the source for multiple domains.

Maybe, if you want to run a single application,
in global.asax -in Session_OnStart- you could
sniff/parse the URL coming in, and redirect to
the appropiate domain.

But, ASP.NET was not written with that possibility in mind.

You, generally, work with different applications
when they are hosted in different domains.




Juan T. Llibre
ASP.NET MVP
===========
 
P

Patrice

Not sure but you could likely do something like :
- the application root is a directory that is on each and every server, this
way you have a distinct web config file for each
- under the application root you create a virtual that points to your app
single copy

Note that AFAIK 2.0 will allow to deploy a whiole site as as single DLL.

My personal preference would be still to automate deployement on distinct
servers (it could be just a batch) to keep the ability to manage separately
those sites...

Patrice

--
 
L

Ludvig

Tanks



"But, ASP.NET was not written with that possibility in mind.
You, generally, work with different applications
when they are hosted in different domains."



May be this was no good idea after all.
 
L

Ludvig

Thanks



I'll give it a try..


Patrice said:
Not sure but you could likely do something like :
- the application root is a directory that is on each and every server, this
way you have a distinct web config file for each
- under the application root you create a virtual that points to your app
single copy

Note that AFAIK 2.0 will allow to deploy a whiole site as as single DLL.

My personal preference would be still to automate deployement on distinct
servers (it could be just a batch) to keep the ability to manage separately
those sites...

Patrice
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top