Last post Mar 14, 2008 03:42 PM by williamjr
Dec 19, 2007 09:19 AM|nsr81|LINK
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
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.
Dec 19, 2007 09:54 AM|anurajp|LINK
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.
Dec 19, 2007 10:04 AM|Prashant Kumar|LINK
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,
Dec 19, 2007 10:15 AM|Suprotim Agarwal|LINK
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.
Dec 19, 2007 12:09 PM|noahb|LINK
Take a look at web deployment projects (http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx ,
Dec 19, 2007 03:57 PM|nsr81|LINK
Thanks for the suggestions guys. I'll try out the approaches you mentioned and will let you know which one works for me.
Dec 24, 2007 08:30 AM|impathan|LINK
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.
Jan 31, 2008 10:40 PM|nsr81|LINK
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.
Jan 31, 2008 11:51 PM|Suprotim Agarwal|LINK
Glad to hear that!! :)
Mar 14, 2008 03:42 PM|williamjr|LINK
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.