Publish / Copy We Site


https://forum.kartris.com/Topic2949.aspx
Print Topic | Close Window

By djjohnson - Fri 11 Apr 2014
I was wondering the best practice of publishing / Copy Web Site from your local computer to a development environment and then to a production environment. Local, Development, Production all have their own webserver and SQL server. I'm using Visual Studio 2012.
By Paul - Fri 11 Apr 2014
Files are easy enough to move with FTP. The simplest way to deploy the db is to do an SQL backup and then restore the .bak file to the target server. But you need admin access to do this. Some shared hosts provide a facility to upload and restore a backup, others will do it under support.

Most important thing to check is that the SQL versions match. If your web server is running MS SQL 2008 R2, you want to develop locally on the same version. You cannot deploy a backup from a newer SQL version to an older one, so if you have 2012 locally, you won't be able to restore .bak files from that to a server running SQL 2008 R2. In fact, you cannot even restore a backup from SQL 2008 R2 to SQL 2008.
By djjohnson - Sat 12 Apr 2014
Thanks, the only question I still have is related to the application code. We host our servers in our own Data Center so that's not a problem. I tried using Visual Studio 2012 copy web site functionality and went from my local IIS to the development IIS server and then the admin did not work. I got to the admin login page just fine but after I logged in I started receiving the error below and the admin login page would never load again.

Technical Information (for support personnel)

  • Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404.
  • Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.
How should I handle the application code? my scenario is like this. I think the application code is domain specific.

Local Environment: "http://localhost/taxprep_us" - SQL Server Development
Development Environment: "http://dev.taxprep.us" - SQL Server Development
Production Environment: "https://www.taxprep.us" - SQL Server Production