When is the web.config file “executed”?

旧时模样 提交于 2020-12-08 10:51:41

问题


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


回答1:


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.

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.

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



来源:https://stackoverflow.com/questions/11233540/when-is-the-web-config-file-executed

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