ASP.NET Deployment

Over the past few months, I have been writing an intranet site for my college with a lot of student reports for staff. Everything is going fine, but once a week (ish) I need to go to IT, get them to log into IIS, stop the application pool, clear the website folder, clear the asp.NET temporary cache and replace the website with a new one. Not much work, but I would rather do it myself when and when I want.

I know little about deploying ASP.NET, and IIS is there a way for me to update the website myself (supporting the system as much as possible)? The last time I looked at this, I think I found that the files were blocked in the website directory.

What do the various publishing options do?

+4
source share
7 answers

Why are you stopping the application pool and clearing temporary files? It works great for you to overwrite files on the website itself.

The only thing I do is go into the bin directory and clear all files with an arbitrary .dll name.

Visual Studio also has its own deployment option, which you can simply specify the UNC path, and it will delete the old files and copy the new version of the site. It even throws you app_offline.html.

+2
source

Actually, I work with two forms:

1) Publish the VS form in a local directory and then upload (via ftp) to the server. I make it so that I use the ftz client filezilla and not transfer the web.config file.

2) Pre-compile the website (from ccnet), write it down, go to the server, connect to the server (remote desktop) and execute the .bat file that will put the application offline ( App_Offline.htm ), create a backup and unzip new version. We plan to create a second website for the administrator to avoid manually connecting and executing .bat.

+2
source

You can activate Frontpage-Extensions for this network in IIS. They handle all deployment and upgrade. We have activated them for each website for ease of maintenance.

Visual Studio can connect and deploy directly to websites that support Frontpage-Extension, so there should be no problem.

+1
source

You can simply overwrite files that exist if you go along this route. Personally, I have Cruise Control.NET for my deployment, and I like it. I have a subversion setup, so our development and creation systems are automatically updated with every commit on svn. Then for live, I flag everything that I need and change the configuration to pull out this new tag for the Live site and force it to build. It works very well, you have to check it out. It also compiles your .cs files and does not deploy if your code is not generated. I believe that Jeff uses it with stackoverflow.

+1
source

You can use a program such as Beyond Compare to connect to your server’s FTP (which you can point to the website folder) and upload new files. You can compare your files, see a line-by-line comparison, and download only modified files. Works well for me.

0
source

To install the ASP.net application on our IIS server (without the need for Visual Studio), we check the project code from version control, and then run the msbuild.exe file in the project file. You can find msbuild.exe in the .Net framework folder, for example:

C: \ WINDOWS \ Microsoft.NET \ Framework \ v2.0.50727 \

The only thing we needed to do was copy by target definitions from one of the development machines, which are usually stored in:

C: \ Program Files \ MSBuild \

It is safe to leave .csproj / .vbproj files in a web folder, since IIS will not serve them, because they will not have the MIME type installed on them, but you can delete them if you want.

This setting is also easily accessible for scenarios, which is a bonus.

0
source

I always update my site during scheduled maintenance, usually outside working hours. Thus, an evening or a weekend is the best time to close in a short time, as well as updating the website. Schedule this service so everyone knows it will be easy.

-1
source

Source: https://habr.com/ru/post/1277384/


All Articles