Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

What is the process to copy an entire .NET website from one server to another server? Both sites are running Windows Server 2008, IIS7, and SQL 2008?

  • The base site is the live site
  • The new site is going to be used as a development site
  • The server hosting the development site has other, existing sites in IIS
  • The servers are on different networks and have different internet domain names

Part of this is easily done, such as copying the database and restoring it. The same can be said for the copying of the directory of files the IIS site gets pointed to -- no help needed for those tasks.

After the database and files are copied over, what are the necessary steps to make the site functional on the second server?

share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Web Deployment Tool is currently the Microsoft recommended way of copying and synchronizing web applications across IIS servers.

Read more here: http://learn.iis.net/page.aspx/446/synchronize-iis/

I noticed you didn't want to use MSDeploy but you didn't mention why.

share|improve this answer
    
I recall having read that the MSDeploy tool may cause unintended consequences if the target (copying to) has existing sites. I have not verified this, not wanting unintended consequences. :) –  Chris Adragna Jan 27 '12 at 16:37
1  
I've had no such problems. But import them into their own web site if possible, or test the import on a development server first. And always take a backup of the IIS config (explained in the article). –  Sire Jan 29 '12 at 9:53
    
Well, then, if that is correct, then why not use the MSDeploy tool? Certainly, if the site is very basic, a file copy will suffice, but for more complicated setups, then MSDeploy appears to be the best way to migrate. Marking your response as the correct answer. Thanks. –  Chris Adragna Feb 1 '12 at 17:43
add comment

If your environnement is identical, i mean with the same physical path, ip etc.. you can just applicationHost.config.

The file is by default located in the C:\Windows\System32\inetsrv\config it's an xml file, si if you rigth a little tool you could change your binding before restore the file in your dev environnement

share|improve this answer
add comment

The applicationHost.config is not necessary in this case since you're going to setup a development server.

I would copy over the configuration to your dev box. The easiest way to do this is to go into IIS on your production server, click on the root server and select Shared Configuration.

Then click Export Configuration... and select a location.

Then on your new server go to the same Shared Configuration and check "Enable Shared Configuration". Choose those files you just exported. When that's complete uncheck enabled shared configuration.

That should get your site setup just like it is for production.

The next thing I would do is to edit the bindings to give it a new host name for dev. If our production site is www.mysite.com we use wwwd.mysite.com for development and wwwq.mysite.com for QA.

If you're big enough to have an IT department you probably want them to set up a DNS entry so developers can just type in wwwd.mysite.com. If you don't have DNS, you can edit your hosts file with a direct mapping to wwwd.mysite.com.

share|improve this answer
1  
When you use shared configuration you hook iis on a new ApplicationHost.config, it's the same thing. I use shared configuration in production for a webfarm. I have multiple server hook the same applicationconfig on a san. When i add a website in one of my webfarm, all other server get the website. Shared configuration will not be the best way to make an developpement environnement i think –  Cédric Boivin Dec 16 '11 at 14:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.