简体   繁体   English

更改web.config中的任何内容后是否需要重建解决方案?

[英]Do i need to rebuild my solution after changing anything in web.config?

Like I changed my connection string to another ip address do I need to rebuild the whole solution/project? 就像我将连接字符串更改为另一个IP地址一样,我是否需要重建整个解决方案/项目? And what if I change anything else in it? 如果我更改其中的其他内容怎么办?

If you're talking about <compilation debug="true"> ,So, you don't need to rebuild your solution/project. 如果您正在谈论<compilation debug="true"> ,那么您无需重建解决方案/项目。

This is about ASP.NET compilation rather than your regular project compilation. 这与ASP.NET编译有关,而不是常规项目编译。 Whenever an ASP.NET application is started, unless it has been published precompiling it, ASP.NET engine will compile your user controls, code-behind code and other areas of your Web application during the first request to your Web site. 每当启动ASP.NET应用程序时,除非已经对其进行了预编译,否则ASP.NET引擎将在对网站的第一次请求期间编译用户控件,代码隐藏代码和Web应用程序的其他区域。

否。但是您需要重播/重新启动项目或从IIS重新启动网站才能使web.config中的更改生效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM