locked
How to deploy a website? RRS feed

  • Question

  • User1243057325 posted

    Hi All,

     
    I'm using Visual Studio 2005 (Team Development Edition) to build a small website for my employer.

     I have an "ASP .NET Web Site" project on a development server, which is running IIS 6.0 with Frontpage extensions. I was wondering what is the best way to deploy it to a production server, which is identical setup (IIS 6.0, etc).


    Initially, I right clicked on project in solution explorer and chose "Publish Website" option. Which asked me the URL to which I wanted the website published. I gave it the URL to my production box. It deployed a precompiled version of the website on the production server. However, when I had to go back and make some change and republish the site, it deleted everything first. I lost the custom ACL configuration on some of the folders and had to redo those. Also, it skips all the images and does not copy them to the target server.

     Is there anyway to make it so that current files are not wiped out before I puts out a new copy on the target machine? Should I just copy the source files manually instead of using Visual Studio to publish a precompiled copy?

     Any advice would be appreciated.

    Thanks.

     

    Wednesday, December 19, 2007 9:19 AM

Answers

  • User-2005691517 posted

     The procedure I follow is to first publish the site to a folder on the development machine and then copy the published site to the production server. This way you can control what you are copying.

    I normally leave out the web.config which generally has different settings on the production server, 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2007 10:04 AM
  • User1827201912 posted

    Hi,

    You can use the CopyWebSite Tool. It lets you copy selected files individually or copy all of the files for a site at once.

    The Copy Web Site tool checks the status of each file and performs the following tasks:

    New files are copied to the site that does not have the file.

    Changed files are copied so that both sites have a copy of the newest version of the file.

    Unchanged files are not copied.

    http://msdn.microsoft.com/en-us/library/c95809c0(VS.80).aspx

     

    HTH,
    Suprotim Agarwal

    -----
    http://www.dotnetcurry.com
    -----

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2007 10:15 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2007 12:09 PM

All replies

  • User-383679542 posted

    I think manual deployment using any FTP software is better than using VS, becuase VS will not transfer directories with images, static html etc. And if you have modified any config file in Production different from development, it is also a problem.

    Wednesday, December 19, 2007 9:54 AM
  • User-2005691517 posted

     The procedure I follow is to first publish the site to a folder on the development machine and then copy the published site to the production server. This way you can control what you are copying.

    I normally leave out the web.config which generally has different settings on the production server, 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2007 10:04 AM
  • User1827201912 posted

    Hi,

    You can use the CopyWebSite Tool. It lets you copy selected files individually or copy all of the files for a site at once.

    The Copy Web Site tool checks the status of each file and performs the following tasks:

    New files are copied to the site that does not have the file.

    Changed files are copied so that both sites have a copy of the newest version of the file.

    Unchanged files are not copied.

    http://msdn.microsoft.com/en-us/library/c95809c0(VS.80).aspx

     

    HTH,
    Suprotim Agarwal

    -----
    http://www.dotnetcurry.com
    -----

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2007 10:15 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2007 12:09 PM
  • User1243057325 posted

    Thanks for the suggestions guys. I'll try out the approaches you mentioned and will let you know which one works for me.

     

    Thanks. 

    Wednesday, December 19, 2007 3:57 PM
  • User1062752276 posted

    download web deployment project.
    This software is the best to deploy web application on the server.Install in you pc and open dot net.You will see third option " Add Web Deployment" on solution explorer. Click on it.It ask where you want to create directory of your deployment project.

    Monday, December 24, 2007 8:30 AM
  • User1243057325 posted

     Hi Folks,

     Just wanted to give an update on this. I was successful in deploying the website using the Copy Website tool and then using robocopy.

     Thanks for your help in this.

    Thanks.
     

    Thursday, January 31, 2008 10:40 PM
  • User1827201912 posted

    Glad to hear that!! :)

    Thursday, January 31, 2008 11:51 PM
  • User1251766766 posted

    I totally agree with this idea that first publish the site to a folder on the development machine and then copy the published site to the production server. This is best way you can control what you are copying. So by this way you have total control on it.

    Friday, March 14, 2008 3:42 PM