安全部署ASP.Net应用程序 [英] Safe deployment of ASP.Net applications
问题描述
可能重复:
如何以零停机时间部署ASP.NET应用程序
您好,
我有一个我要部署的asp.net应用程序安全(尽可能少的停机时间)。我想做一些像蓝绿色部署但不需要第二个Web服务器的内容。
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:
- 在IIS中设置另一个网站(原始副本),目前我使用主机头来引导流量跨站点)。
- 然后,我可以在本地查看新网站,直到网站完全在线(由于NHibernate启动和其他高强度任务需要一段时间)。
- 一旦网站2完全启动,我会改变主机头,给我一个更小的停机时间。
所以我的问题是有没有人做过这样的事情?更改主机头时,IIS会重新启动我的应用程序池还是应用程序?任何其他选项?
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?
感谢您的帮助。
Guido
推荐答案
如果您触摸web.config,您的应用程序池将回收。即使这样,当您重新定向到新站点时,它仍处于不同的路径,因此将创建一个新的会话对象(如果您正在使用会话)。 cookie怎么样?你会使用根路径来设置它吗?否则,这两个站点之间不会共享cookie。
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.
简单的解决方案是实际取消网站(app_offline.htm),复制文件,也可以打开一个温暖的启动。
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/
有你考虑过ARR?
http:// www .iis.net / download / applicationrequestrouting
这篇关于安全部署ASP.Net应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!