Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
602 views
in Technique[技术] by (71.8m points)

deployment - How Do I deploy an application to IIS while that web application is running

Where I work, we release bug fixes in to the system every night when we know our clients are not using the system.

Trying to take a step towards better service I'd like to deploy to IIS while the application is running.

A solution that comes to mind is to setup two different IIS applications and switch them over after deploy using a script. But I'm not going to try this out as I don't want any complications during our busy hours.

Does anyone have experience in this area of deployment?

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Regardless of whether you're using PHP, ASP, ASP.NET etc there is no native support for transactional deployment on IIS.

The simplest approach would be to have two physical folders and (optionally two web sites - one production, one test) on your web server, for example:

c:websitesmyappdep1  
c:websitesmyappdep2

Initially your site would have its physical path pointing to c:websitesmyappdep1.

When you deploy your latest build you'd deploy into c:websitesmyappdep2. Once you're done just switch the physical path of the production site over to this folder. This means you still have the original site and can fall back to it if the new code fails for whatever reason.

The next time you do a deployment you'd deploy into c:websitesmyappdep1 and once you're done switch the production site to that folder.

You could optionally have a test site that points to the folder you're deploying to so you can make sure the site works before switching your production site over.

This could all be scripted.

Here's some related reading that may be of interest:

Publishing/uploading new DLL to IIS: website goes down whilst uploading

Is smooth deployment possible with componentized ASP.NET MVC apps?

Rob Conery also had an excellent blog post about the lack of a decent deployment story for ASP.NET application. You should take a trawl through the comments some of which are quite insightful:

ASP.NET Deployment Needs To Be Fixed

Getting Constructive On ASP.NET Deployment


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...