Last post May 22, 2007 02:03 PM by mase
Feb 13, 2007 11:22 AM|jonwillis|LINK
I've written an ASP.NET Web application and successfully published it to my production server. Things are fine...until I want to update a single page and/or its CodeBehind.
Publishing a Web site deletes all files in the directory and rebuilds the site completely. Not an option for a production Web site - I can't afford down-time. Having precompiled the Web site, the ASPX and their CodeBehind classes don't reside in the normal
directory structure. The "Copy Web Site..." tool doesn't work because of precompilation.
How do I publish a single change to the server? What are my options?
Feb 13, 2007 05:26 PM|JoshStodola|LINK
Try the Copy Web Site tool. I dont think you will need to be concerned about precompilation.
Or, if you have access to the server, create a Web Setup Project (.msi) and run it on the server. To create web setup project (in visual studio 2005):
File | New Project
Other Project Types -> Setup and Deployment
Web Setup Project
Feb 13, 2007 07:42 PM|jonwillis|LINK
Feb 14, 2007 09:41 AM|JoshStodola|LINK
404 mean page not found. Your're server is not properly configured. Copy Web Site works just fine. I have a rather large web application in production right now that was deployed without publishing. All I did was copy the files to server. Runs fine!
The publish feature is not a load of crap, it might just not suit your needs. I suggest you do some reading on Web Deployment Projects:
Mar 23, 2007 10:38 PM|mase|LINK
I'm also very interested in this. It's not feasible at all to be forced to publish an entire site if only one page changed.
The problem I'm running into is that when I am ready to deploy or push my updates to the staging or production server, ASP.NET requires me to use th "publish" feature so that it can insert the name of it's randomly generated assembly file name (ie. App_Web_1fxlaqp6.dll)
into the Inherits="" attribute of each page's page directive. Without this, the page doesn't know where it's code is at.
I just took a look at the copy website tool. Does this handle inserting the random assembly file names into the aspx pages when I "Copy" them up? I did a quick test and it appeared to not be working the way I hoped by knowing which assembly it's code resides
and modifying the file appropriately.
Is a Web Setup Project the same as a Web Deployment Project? I read through Scott's blog post about Web Deployment, but figured that this was included in Visual Studio 2005 by now? Still wondering when I would use a Web Setup Project?
Thanks for the help
Mar 27, 2007 05:33 PM|eccsolutions|LINK
Try using Deployment Project instead of publishing directly to production. Deployment Project allows you to control the way your site is compiled through a user interface instead of having
to know the ins and outs of compiling a web project. I know more about gcc compilers than I do about VS compiler, but I can tell you what worked for me.
We use Deployment Project to merge all outputs to a single assembly (i.e. MyApplication_deploy.dll instead of App_Web_1fxlaqp6.dll). This way, if we make a change to a code behind, all we have to deploy is MyApplication_deploy.dll, App_Code.compiled (only
required if compiled to include it), and App_global.asax.compiled (only required if using a global.asax file). If the change is to the .aspx page, then just deploy that page all by itself. Try it for yourself and you'll find this solves the issues both of
you are having.
May 22, 2007 08:14 AM|KhushbuDesai003|LINK
Hi I'm also face this Problem of Publish only changes in the Website.i changes many forms write now i have to it manually setting of chnages in .aspx forms please find out solution.
May 22, 2007 02:03 PM|mase|LINK
Yep, as mentioned the solution is to use Deployment Projects. Follow the links above. It's somewhat tricky to get setup properly, and is awfully slow to build - but it will definitely provide the flexibility needed.