[英]asp.net: slow debugging - always fire application_start
I have an app with about 200 aspx pages and it started to run slowly some days ago. 我有一个约200个aspx页面的应用程序,几天前它开始运行缓慢。
It seems that the VS 2010 debugger started to fire application_start on every single code change. 似乎VS 2010调试器开始在每次代码更改时触发application_start。
Before this slow behavior, the debuger fire the application_start just once and I had to stop the dev server to force the event. 在出现这种缓慢行为之前,调试器仅触发一次application_start,而我必须停止开发服务器来强制事件。
Thanks. 谢谢。
That is how Application_Start
is supposed to work. 那就是Application_Start
应该如何工作的。 It only fires when the Application Pool starts or when there's a change to the code-base, or a web.config file, which would cause it to restart. 它仅在应用程序池启动时或代码库或web.config文件发生更改(会导致其重新启动)时触发。
This article discusses the topic in more detail. 本文将详细讨论该主题。
I think your code is either creating/ deleting folder on web server which is causing the issue. 我认为您的代码正在Web服务器上创建/删除文件夹,从而导致了问题。
You should check ASP.NET restarts when a folder is created, renamed or deleted 您应该检查在创建,重命名或删除文件夹后ASP.NET重新启动
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.