为什么 IIS Express 总是关闭应用程序并重新启动它?
Why does IIS Express shut down the Application and restart it all the time?
我正在 Visual Studio 2013 和 IIS Express 中调试应用程序。我注意到某些缓存值和静态变量一直丢失。为了调查它,我在 global.asax
的 Application_Start
和 Application_End
中设置了断点,我发现它们经常被触发。
有什么方法可以查看 IIS Express 中 Application_End
事件的原因吗?
编辑: 需要说明的是,Application_Start
和 Application_End
事件在同一调试会话中被触发多次。这些事件中的断点在我没有停止或重新启动调试会话的情况下被命中多次。
IIS Express 旨在为开发目的模拟 IIS,它随 Visual Studio 2012 和 2013 一起提供。
Is there any way to see the reason of a Application_End event in IIS
Express?
由于是用于开发,所以在Visual studio中执行web项目时启动,结束时停止。
参见:Web Servers in Visual Studio for ASP.NET Web Projects
IIS Express starts automatically when you run a project in Visual
Studio, and it stops when you close the web site project or web
application project in Visual Studio.
编辑:
要解决您的编辑问题,请确保您没有修改 web.config
或 creating/modifying 应用程序文件夹 (bin) 中的任何文件。这可能会导致应用程序重新启动。
找到了。我的代码位于 Dropbox 文件夹中,显然 Dropbox 更改了 Web 项目的 bin 文件夹中的某些内容。
当我停用 Dropbox 时,问题就消失了。
我正在 Visual Studio 2013 和 IIS Express 中调试应用程序。我注意到某些缓存值和静态变量一直丢失。为了调查它,我在 global.asax
的 Application_Start
和 Application_End
中设置了断点,我发现它们经常被触发。
有什么方法可以查看 IIS Express 中 Application_End
事件的原因吗?
编辑: 需要说明的是,Application_Start
和 Application_End
事件在同一调试会话中被触发多次。这些事件中的断点在我没有停止或重新启动调试会话的情况下被命中多次。
IIS Express 旨在为开发目的模拟 IIS,它随 Visual Studio 2012 和 2013 一起提供。
Is there any way to see the reason of a Application_End event in IIS Express?
由于是用于开发,所以在Visual studio中执行web项目时启动,结束时停止。
参见:Web Servers in Visual Studio for ASP.NET Web Projects
IIS Express starts automatically when you run a project in Visual Studio, and it stops when you close the web site project or web application project in Visual Studio.
编辑:
要解决您的编辑问题,请确保您没有修改 web.config
或 creating/modifying 应用程序文件夹 (bin) 中的任何文件。这可能会导致应用程序重新启动。
找到了。我的代码位于 Dropbox 文件夹中,显然 Dropbox 更改了 Web 项目的 bin 文件夹中的某些内容。
当我停用 Dropbox 时,问题就消失了。