One web.config, for multiple domains

  • Thread starter Thread starter Ludvig
  • Start date Start date
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.
 
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
 
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??
 
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
===========
 
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

--
 
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.
 
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
 
Back
Top