Syntax Error
Syntax Error

Reputation: 1640

Moving ASP.net site to another server

Assume I have asp.net websites on Server1 and need to move them to Server2, what is the best practice for this and how do I ensure that all relevant files, databases, etc are moved as well? Am I going to have to manually amend all the web.configs and other config files, plus find out what dependencies each site has, or is there a way to just export everything and import to the new server?

I have not found anything else on SO that has instructions for this.

Thanks

Edit: This is similar but not the same as the other question. The other question doesn't actually provide an answer, just some ideas about staging environments.

I'd like this to be as automated as possible due to having about 30 applications to move. The new server is pretty much identical but I noticed that when I moved one application using 'Web Deploy' as a test, it didn't bring over the dependencies and I had to manually find out which ones were missing and install them.

Upvotes: 0

Views: 4742

Answers (1)

Aristos
Aristos

Reputation: 66641

how do I ensure that all relevant files, databases, etc are moved as well?

Typical asp.net sites have all data, and database under the one main directory. So you just copy/paste the full directory from the old to the new one server.

But we have some points to note here.

  1. DataBase files are locked by the database, so you need to first remove them from the database.
  2. In the new site you need to remount the database files and change the web.config according to the new server (eg, maybe new ip address, new names on database.

and finally the permissions on the new host must be correct and the same, if you have for example some directory that you need write permissions, you must add it also to the new server

You can also read: How to set correct file permissions for ASP.NET on IIS

Upvotes: 2

Related Questions