web.config 文件何时“执行"? [英] When is the web.config file "executed"?

查看:51
本文介绍了web.config 文件何时“执行"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否在每次加载站点页面时执行/由服务器读取?

Is it executed / read-by-the-server every time a page on the site is loaded?

推荐答案

web.config 在创建应用程序时加载到内存中.这通常是对应用程序中页面/资源的第一个请求.IIS (ASP.NET) 监视 web.config 的更改,如果发生更改,将重新启动您的应用程序.

The web.config is loaded into memory when the Application is created. This is typically the first request to a page/resource in the application. IIS (ASP.NET) monitors the web.config for changes and will restart your Application if a change is made.

如果您的问题实际上是当文件更改时,web.config 设置会自动更新吗?"答案是肯定的,但是您的应用程序将重新启动,这可能会导致意外行为,包括会话和数据丢失.

If your question is actually "will web.config settings automatically update when the file is changed?" The answer is YES HOWEVER your Application will be restarted which can result in unexpected behavior including session and data loss.

上述某些陈述并不总是正确的,我建议阅读以下内容:http://msdn.microsoft.com/en-us/library/ms178685.aspx

Some of the above statements are not always true and I recommend reading this: http://msdn.microsoft.com/en-us/library/ms178685.aspx

这篇关于web.config 文件何时“执行"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆