Deploy multiple sites on single domain (Probably not an asp question)

Normal 0 21 false false false ES-MX X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

Hello everybody,

Probably this is more an IIS question than an asp question but I'd like to hear your comments for better solutions.

I'm beginning a project to give basic web pages to 80 communities of my state, so for example each community will choose from about N different sets of templates and will be able to add custom information for their site. The web site itself is not complicated (at least in this first stage) but if everything goes fine, there will be the more functionality to provide in future upgrades.

For this reason, I think it's better to centralize everything in a single asp.net web project which will deliver information based on the Url typed by the user. If for example someone navigates to http://community1.domain.com or http://community2.domain.com then the main asp.net application domain.com/index.aspx will deliver the appropriate content based on communityX sub-domain. It would be great to preserve the http://communityX.domain.com Url at the navigator's bar instead of changing it to http://www.domain.com.

I'm not sure if this is a matter of asp.net application. I think there should be something to do with IIS to be able to understand communityX sub-domains but I'm not really sure what should be better to accomplish this task.

Any help or comments are really appreciated.

0
axel20000
4/29/2009 6:57:32 PM
asp.net.config-deploy 12495 articles. 0 followers. Follow

7 Replies
718 Views

Similar Articles

[PageSpeed] 53

 It only matters how do you set the Application physicalPath. You can set as much sites as you want to refer the same files/path

 

<site name="mysite1.com" id="1" serverAutoStart="true">
        <application path="/">
          <virtualDirectory path="/" physicalPath="C:\Sites\mysite" />
        </application>
        <bindings>
          <binding protocol="http" bindingInformation="xx.xxx.xxx.xxx:80:www.mysite1.com" />
          <binding protocol="http" bindingInformation="xx.xxx.xxx.xxx:80:mysite1.com" />
        </bindings>
        <logFile logFormat="W3C" />
      </site>

<site name="mysite2.com" id="2" serverAutoStart="true">
        <application path="/">
          <virtualDirectory path="/" physicalPath="C:\Sites\mysite" />
        </application>
        <bindings>
          <binding protocol="http" bindingInformation="xx.xxx.xxx.xxx:80:www.mysite2.com" />
          <binding protocol="http" bindingInformation="xx.xxx.xxx.xxx:80:mysite2.com" />
        </bindings>
        <logFile logFormat="W3C" />
      </site> 

 

etc.

 

you can even do this programatically. Smile


When you ask a question, remember to click "Mark As Answer" when you get a reply which answers your question.
0
Kulrom
4/29/2009 8:19:18 PM

Thanks Kulrom, it sounds really interesting. I can't test it now because I'm not in my dev machine.

I'm using IIS 5 with Windows XP Pro as testing server, but I'm still not sure which will be the production server. This project is still in design phase but it's good to know available implementation options to consier them when at design.

I hope to share my results tomorrow.

Thanks

0
axel20000
4/30/2009 3:00:39 AM

Hi Kulrom, I tried your suggestion but I can't find where to put the site tag inside my web.config and I get errors if i put the tag in the wrong place.

I noticed there is an ApplicationHost.config file which could use this tag too, but I supose this is exclusive to IIS 7 because I can't find it.

I did a test and mdified hosts file to redirect my test domains to my test server and was able to catch my browser's petitions and also catched the source petition with Request.ServerVariables["HTTP_HOST"] so I can in some way do what I need (considerig I still have to modify DNS servers for each site) but it would be interesting to use your approach.

0
axel20000
5/1/2009 10:14:05 PM

 You are right. It is an ApplicationHost.config example. However, even if you are using IIS6 you still need to do the same.

Just set the same physicalPath for all 80 sites and you'll be fine. Give it a try (and ingore the example i posted above) .. just use the IIS Manager.


When you ask a question, remember to click "Mark As Answer" when you get a reply which answers your question.
0
Kulrom
5/1/2009 10:52:22 PM

Hi Kulrom, I'll try as you say when the implementetion stage comes. I supose they'll use a Windows 2003 server so IIS 6 will be available. From my XP Pro box I can only make tests with IIS 5 but the process must be similar so I'll start with what I have: http://www.iisanswers.com/Top10FAQ/t10-hostheaders.htm

I don't know much about Windows Server. I understand it serves each request with a different worker process.

I'm planning to identify a city by parsing the HTTP_HOST server variable so I can deliver appropiate content, but in case I need to store any data on a Session object to do more complex work, I'm thinking in the posibility that anyone can use his browser to navigate for example city1.domain.com and then at the same window for any reason type city2.domain.com and then cause a consistency data problem.

¿Will the server create a different session state for that request? It's just an idea but I like to prevent even weird events. Anyway if the session is the same for a browser when navigating among cities, I think I can prevent that event with code.

0
axel20000
5/2/2009 1:10:29 AM

 Good news: in Win2k3 Server you can have them both IIS6 and IIS7.

Usually you use IIS6 for FTP and IIS7 for the sites Wink


When you ask a question, remember to click "Mark As Answer" when you get a reply which answers your question.
0
Kulrom
5/2/2009 8:18:27 AM

 Thanks a lot!!! I didn't know IIS6 could be upgraded. I'll sugest the upgrade to make things easier :)

0
axel20000
5/4/2009 8:50:16 PM
Reply:

Similar Artilces:

Deploy a site and then deploy changes only !!
 Hi everyone,I do some asp.net 2.0 development .. and currently i deploy my tests .. using Build + publish ... !and then .. i copy & paste the "PrecompiledApp.config" + Bin("App_Code.dll" + "App_Web_4tzghadp.dll..."... etc) + aspx files ... !!This is fine and everything works !!However ... when i modify anything .. even if i add one If statement .. or Response.Write ... i redo the same steps !!! again and again ... (publish & copy & paste &&& ) ..... Notice that .. I don't replace the web.config .. because on my server ...

Errors in Web.config when deploying Club Site Starter Kit on net
On my machine (localhost) i have no problem running it. But when i run it on my host i get this error:Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused...

Can't Access My Site After I Deploy It (Probable dumb noob question)
I have built a site using the Small Business starter kit. It all goes well on my development machine but when I publish it to my hosting company (1&1) I just get the following error when I try to browse to it:HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. Requested URL: /default.aspxI can browse the files on the web site via FTP fine and if I put up a static html page and point at that...

Agent deployment/Deployment status question
1. Is there a way to point the setup file to setup.iss (or to somehow supply the serial # and URL automatically) without making it a silent install? (ie something other than "setup.exe -s") 2. How do I clear out the "Deployment Status" on "PLUS status page"? It is getting rather cluttered. For the install, I typically use the MSI so that I can add the serial and host using the parameters: SERIAL= and HOST= If you are manually running the install, create a batch file that launches the MSI with the appropriate parameters. I do not know if ther...

Deployment To Multiple Sites
Hi,  I developed a web app that is basically access a database of links to file locations.  So when a user in my office accesses my program they can pull up records of past projects which will contain the file link which is usually a link to a .pdf file.  Fine and dandy eh!Now my company wants me to deploy this application throughout all offices.  I am a little unsure of the route to take with this.  I could either, host the app in one office, my database(sql server) in the same office and have it so that the file link is different for each office.  I am just no...

Deploying multiple version of the same site
 Hi yal....Working in asp.net 2.0, is there any way to have multiple versions of the same project on a server running without having namespace issues.E.g. if i have a.. portal site for company A and another for company B. both independant of each other. now i should be able to run the same portal for both companies but as a different project.have i missed something or can this be done through deployment. because classes have issues having the same namespace.any links or something will be most appreciated! thanks wise-ones    The_Razorblade:is there any way to have mult...

VB.NET Deployment Question
I am primarily an ASP.NET developer, but was looking for some quick help with vb.net deployment (since many of my apps have both vb.net and asp.net components running together). I have a large web application that runs along with a vb.net component that is essentially a monitor. The monitor piece constantly checks for certain conditions and fires off items. The web app is used for interfaces, reports, status reports, etc. Essentially the vb.net piece handles all of the behind-the-scenes automated processes, and the asp.net application handles everything else. I was wondering about depl...

Deploy to production site question
Hi. How does one deploy a Visual Studio 2005 ASP.NET application to the production server without disrupting the users who are currently using the app? I've used the "Publish web site" before, but it precompiles the site, which I don't want. I'd like the source code to be available there, as well. Is there a way to do this? Whenever you modify a web.config file - it will disrupt the application. So a general rule is when upgrading a website - don't overwrite the web.config unless necessary. If you just replace the binaries, the application won't restart which means sessions will sti...

Re-deploy a deployment
I have made a deployment of about forty patches which i deployed to a testgroup. Now I need to deploy this to the rest of the pc's in my office and would like to re-use the old deployment. So I want to change an old deployment and then redeploy it. Is this possible? And if so, how do I do it? thanks -- eddzzz ------------------------------------------------------------------------ Eddzzz, have you tried going to the deployment, checking the box next to it and clicking deploy at the bottom of the page? :) -- Shaun Pond That sounds very obvious, s...

Develop in .NET 3.5...Deploy on .NET 3.0...Assembly strong name issue in web.config
Hi. I develop locally using web developer express 2008. I have .NET 3.5 installed on the development machine.I am trying to deploy to a Windows Server 2003 machine running.NET 3.0.Not surprisingly, I get an error about the strong assembly names referenced all over my web.config when I try to access the site on the production server.I don't think any of my code truly relies on .NET 3.5--it should all be compatible with the 3.0 framework.Here's my error message:Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77...

Can "Add Web Reference" if web service deployed to new web site, Can't add ref if deployed to Virt Server under Default web site (Sharepoint)
I have created a web service wich I can deploy successfully to a new IIS Web, but of course I have to set the port to something other than 80 (and I'd rather just use a virtual server under the Default web). If I try to deploy my web service under the Default Web as a new virtual server, and then try to "Add a web Reference" to the service, it fails with a 404: not found error. Notes: WServer 2003 My IIS server is running Sharepoint Portal Server (SPPS)sp2.  VS2005 Any ideas? /Bob C in GRR In Sharepoint Portal Admin I had to add a Path Exclusion.  Took me a whi...

Web Deployment: How to deploy virtual dirs und a web site?
I have a web site that is hosted in IIS. Everything works fine with deployment.Now, I've added a virtual directory (without application bit) under this website in IIS and I've added a Web Site project to my solution. Working with this extension is fine.But now I want that the deployment project also copies the contents of the virtual dir when I deploy the main web site. I've found out that I have to check the setting "Use IIS metabase for source input". Leaving this setting unchecked the virtual dir is not copied.But then I get the following error: C:\Program Files\MSBuild\Microsoft\WebDepl...

Deploying Database Changes to multiple sites
I have an application that is installed in several user sites around the country. When I make changes to the database (new tables, new columns, etc.) I deploy them in an xxx.sql file that each user must execute in ISQL. My problem is that frequently the user receives an error message that they don't report, causing them to miss potentially critical updates to their database. I've been working on a PB application that will run the database updates and report the errors into a text file that the users can fax back to me so I can verify that the updates sucdeeded. However, it ...

Deploying CR for VS.Net question
Hi I created a deployment setup project as said in an article http://support.crystaldecisions.com/communityCS/TechnicalPapers/crnet_deployment.pdf The build of the project was successful and has files in the debug folder under the Setup project. To be able to run the reports from our development web server do i just need to copy these setup files and run setup.exe on the server. Any suggestions are welcome Thanks That's exactly what you need to do. Hi, I did exactly the same thing. But I got a "Load report failed" error. Can anybody tell me what is wrong? Than...

Web deployment and multiple interfaces/sites
Is it possible to install an application on a given interface? I only got an option regarding the port, but lets say I got two sites running on port 80 and they are bound to different interfaces. Is it possible to give the user the option on wich site to install on?...

Web resources about - Deploy multiple sites on single domain (Probably not an asp question) - asp.net.config-deploy

Code division multiple access - Wikipedia, the free encyclopedia
Code division multiple access ( CDMA ) is a channel access method used by various radio communication technologies. It should not be confused ...

Man charged with murder of 21yo found on road in Tewantin with multiple stab wounds
Police charge a man with the murder of a 21-year-old man found lying on a road with multiple stab wounds to his chest.

Nigeria: Over 70 Feared Killed in Borno, Adamawa Multiple Blasts
More than 70 people were feared killed in multiple bomb attacks believed to have been carried out by Boko Haram militants and their agents in ...

Facebook is testing multiple topic-based News Feeds for mobile devices
... the information you want to see at the appropriate times. According to the screenshots taken by Jason Stein, Facebook looks to be testing multiple, ...

Munich Police: Islamic State Planned New Year’s Eve Attack with Multiple Suicide Bombers
Munich police warned of a “serious, imminent threat” by Islamic State group suicide bombers wanting to commit an attack on New Year’s Eve.

Jim Cramer on balancing multiple jobs, his Brooklyn bar, and the Jon Stewart interview - Business Insider ...
It was during law school that Cramer started recommending and trading stocks, which led to becoming a stockbroker at Goldman Sachs.

Miami teen shot multiple times at grandma's home
The victim reportedly remains in the hospital as police continue to search for the suspect

Gov. Jerry Brown pardoned Robert Downey Jr. for his multiple crimes in the ’90s
I’m old enough to remember when Robert Downey Jr. was an utter mess. Back in the ‘90s, I lost count of how many times he was arrested, how many ...

BREAKING: Tomah VA Mental Health Specialist JAILED Over Multiple Sexual Assault Allegations
BREAKING: Tomah VA Mental Health Specialist JAILED Over Multiple Sexual Assault Allegations

Showtime Previewing ‘Shameless’ & ‘Billions’ Premieres On Multiple Platforms
Demonstrating the increasing importance of the network’s original programming in bringing in new customers, Showtime will be providing subscribers ...

Resources last updated: 1/7/2016 1:02:29 PM