what to copy to production server when an update is made in a web application development environment

核能气质少年 提交于 2020-01-24 14:01:28

问题


I have a web application built in Asp.net framework 3.5 (.Net 2008), and I use a Web Deployment Project (WDP) to compile it.

I'd like to know, for instance if I made some changes to a code behind file (.aspx.vb), what files do I need to upload to the production server in order to get the new changes updated there. Same thing in the case of .aspx files.

I know that I can copy the whole web application directory to the production server, but, can I copy just the updated files?

any guide will be appreciated.


回答1:


As you know a class is a consolidated list of three files in case of Web Application

  1. ASPX
  2. Designer
  3. Code Behind

Case - 1 Changes made in one file(.aspx/.cs/ .designer.cs)

Suppose in your project you have 50 - 100 files and you made change in single file and it's impact caused in all the above three mentioned files. In that case you need not to upload all published files on Deployment Server. You need to replace the rebuild files for following.

  1. Web Application DLL file
  2. ASPX Page

Case - 2 When changes made in Script files like .css or .Js

  1. In this case you need not to replace the Web Application Dll
  2. Replace only .css or .js files.

Hope this may help you in your deployment process and may save you lot of time




回答2:


replacing only projectname.dll will reflect your changes as far as you did not make any changes in HTML of any page otherwise you have to replace aspx pages also

AFAIK you don't need any files to upload from deployment project still have a backup of your current project.dll or may be whole project(if you can afford) before uploading the new one on server just for the sake of safety

Web Deployment projects do not change the way Visual Studio 2010 Web Sites or Web Application Projects build. Instead, they take an existing Visual Studio Web project as input and generate a precompiled Web as an output. A Web Deployment Project does not change the files in the source Web site project in any way.

it is stated here



来源:https://stackoverflow.com/questions/9297312/what-to-copy-to-production-server-when-an-update-is-made-in-a-web-application-de

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!