简体   繁体   English

ascx / aspx文件的变化 - 它会重置应用程序

[英]Changes in ascx / aspx files - will it reset application

Changes in ascx / aspx files - will it reset application? ascx / aspx文件的变化 - 它会重置应用程序吗? Sometimes on dev server they won't cause it whereas on live server I think it sometimes causes it. 有时在开发服务器上它们不会导致它,而在实时服务器上我认为它有时会导致它。 What is the rule? 规则是什么?

Thanks Pawel 谢谢帕维尔

It depends on what you change in the file. 这取决于您在文件中更改的内容。 If you just swap some markup that don't affect any code and the project is published with the "updateable" option, it will not re-compile your solution. 如果您只是交换一些不影响任何代码的标记,并且项目使用“可更新”选项发布,则不会重新编译您的解决方案。

However if you change to much or change inline code, it will need to be re-interpreted / re-compiled, thus your applicaiton will "reset". 但是,如果您更改或更改内联代码,则需要重新解释/重新编译,因此您的应用程序将“重置”。

It depends on how to deployed your application; 这取决于如何部署您的应用程序; ASP.NET Deployment ASP.NET部署

If you deploy simply; 如果你简单地部署; copy the application files you have created from your development computer to the production; 将您从开发计算机创建的应用程序文件复制到生产中; In this way your application will not be reset only the page .aspx , or the page having the user control .ascx will be compiled. 这样,您的应用程序将不会仅重置页面.aspx ,或者将编译具有用户控件.ascx的页面。

However in case if you deployed your application by ASP.NET Web Site Precompilation , then it has further options which may affect compilation. 但是,如果您通过ASP.NET网站预编译部署了应用程序,则它还有其他选项可能会影响编译。

Selecting a Precompilation Model 选择预编译模型

Well, if you used a precompilation model with UI Update, then changing aspx or ascx will not reset your application, otherwise with other models your application will be reset. 好吧,如果您使用带有UI Update的预编译模型,那么更改aspx或ascx将不会重置您的应用程序,否则对于其他模型,您的应用程序将被重置。

Further to Filip's point, if Shadow Copy is enabled, the application will reset only when you recycle the application pool. 继Filip之后,如果启用了Shadow Copy,则只有在回收应用程序池时,应用程序才会重置。

http://odetocode.com/articles/305.aspx http://odetocode.com/articles/305.aspx

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

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