homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

Loads of sites on the same server using the same application.
How to have one application rather than one for each site.

 9:21 am on May 12, 2004 (gmt 0)

Hi All,

I have an idea that will make a future project much easier to manage, however, I am not sure if what I am suggesting is possible. Please bear with me as my plan is very difficult to explain.

What I Have
A Windows2000 webserver which contains a number of websites

What The Plan Is
A large number of the websites are going to have an ASP application included on the site. The code is the same for each website and only the database will change. Ideally the URL should look like ht*p://www.widget.com/application/

The Problem
As the code will constantly develop of time I need a way of making sure all the sites are using the same code as an update occurs.

My Solution (If Possible)
Somehow, on the server, just have one copy of the application. I can use the IP Address of the visitor or some other method to determine which database it needs for the visitor. Somehow, cloak the URL so it looks like ht*p://www.widget.com/application/ when it is actually ht*p://www.someotheraddress.com/genericapplication).

That way, the sites are all using the same code and there are no worries of different versions cropping up.

Any advice, ideas or help are welcome. I can't seem to find anywhere that talks about doing this.




 10:52 am on May 12, 2004 (gmt 0)

you could also take an OO approach and design with that type of scalibility.


 11:03 am on May 12, 2004 (gmt 0)

I do something similar to this in java, but the concepts should be similar. I get the servername from the request object, which I check against a table to get a site key. For instance www.host1.com = sitekey1, www.host2.com = sitekey2. I then (in the application) get a template for that site from a database for that site, navigation information, and content. I don't need to, but you could get different db connections based on the key as well.

Why have a site key, and not just use the servername as the key? Well, so www.host1.com and host1.com can have the same key.

Essentially this is doing virtual hosting at the application level.

There is only ever one instance of the application running, but it's look and behavior changes based on the servername in the request object.

Hope that makes sense and at least gives you an idea of one way to do it.


 1:03 pm on May 12, 2004 (gmt 0)


I'm very restricted in the way I can code and sadly there are issues in, for instance, the user of dll's. Therefore, I'm having to go for a more awkward method.


Thanks for you help. I guess I can narrow down the question to how do I get all the users to think they are using www.widget.com/application when they are really using www.some-other-domain-on-the-same-server.com/genericapplication?



 1:11 pm on May 12, 2004 (gmt 0)

Use .NET Remoting. One webservice that each website talks to via http.


 1:26 pm on May 12, 2004 (gmt 0)

Hi duckhunter,

This is ASP not ASP.net unfortunatly.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved