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?

4 Answers 4


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


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.

  • 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 Commented Dec 16, 2011 at 14:22

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.

  • 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. :) Commented Jan 27, 2012 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
    Commented Jan 29, 2012 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. Commented Feb 1, 2012 at 17:43

Web Deployment Tool / msdeploy rocks.... if you are staying within same major version of IIS. However, I have seen significant headaches going from 7.x to 8.x.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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