gpt4 book ai didi

asp.net - IIS Express 在编辑 css、js 或其他 "no bin"文件后回收应用程序池

转载 作者:行者123 更新时间:2023-12-04 23:49:34 35 4
gpt4 key购买 nike

开发平台:VS 2013、MVC 5、IIS Express 7.5。

问题:当我即时编辑 javascript 并按 F5 刷新屏幕时,IIS Express 会无缘无故地回收应用程序池。而且因为我在应用程序启动期间加载了一些程序集,这会导致错误:

The process cannot access the file 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\34d1a25b\a6535eb1\Module1.dll' because it is being used by another process.



这是合乎逻辑的。但是为什么 IIS Express 会回收应用程序池呢?

我试图根据 Scott Gu post 追查原因但错误是观众再次胡说八道:

The description for Event ID 0 from source .NET Runtime cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: _shutDownMessage=Change in App_Offline.htm HostingEnvironment initiated shutdown Change in App_Offline.htm HostingEnvironment caused shutdown Change in App_Offline.htm

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() ... at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

the message resource is present but the message is not found in the string/message table



唯一对我说话的是

_shutDownMessage=Change in App_Offline.htm HostingEnvironment initiated shutdown Change in App_Offline.htm



stackoverflow 上也有类似的问题,比如 thisthis workaround和一个可能的答案 here但我仍然不明白 - 谁对此负责,主要原因是什么?或者不同的情况有不同的原因?

最佳答案

描述了对我有用的唯一解决方案 here它更像是一种具有所需副作用的解决方法,而不是带有适当解释的完整解决方案。

  • 浏览到 %APPDATA%\Microsoft\VisualStudio\12.0
  • 删除 app_offline.htm
  • 创建一个同名的文件夹 - app_offline.htm
  • 完成

  • 我这样做了,问题就消失了。

    关于asp.net - IIS Express 在编辑 css、js 或其他 "no bin"文件后回收应用程序池,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26054369/

    35 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com