Safe deployment of ASP.Net applications [duplicate]

我只是一个虾纸丫 提交于 2019-12-22 10:22:16

问题


Possible Duplicate:
How to deploy an ASP.NET Application with zero downtime

Duplicate Question

Hi All,

I have an asp.net app that I want to deploy safely (with as little down time possible). I would love to do something like blue green deployment but without the need for a second web server.

So, I know I can use load balancing, etc but I need a quick and cheap approach. I was thinking of doing something like:

  • Setting up another website (copy of original) in IIS, currently I use host headers to direct traffic across sites).
  • I could then view the new site locally until the site is totally online (due to NHibernate start up and various other high intensity tasks this takes a while).
  • Once site 2 is totally started I would then change host headers around giving me a much much smaller down time.

So my question is. Has anyone done anything like this? Will IIS restart my app pool or application when changing host headers (making this useless)? Any other options?

Thanks for your help all.

Guido


回答1:


If you touch web.config, your app pool will recycle. Even then, when you redirect to the new site, it is in a different path and hence a new session object will be created (if you are using session that is). What about the cookie? Would you set it using a root path? Otherwise the cookie will not be shared between the two sites.

The simple solution would be to actually take down the site (app_offline.htm), copy files over and maybe peform a warm startup.

http://learn.iis.net/page.aspx/688/using-the-iis-application-warm-up-module/

Have you considered ARR?

http://www.iis.net/download/applicationrequestrouting



来源:https://stackoverflow.com/questions/2726491/safe-deployment-of-asp-net-applications

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