Dev platform : VS 2013, MVC 5, IIS Express 7.5.
The problem : When I edit a javascript on the fly and hit F5 to refresh screen IIS Express recycles the app pool for no apparent reason. And because I am loading some assemblies during app start this causes an error :
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.
which is logical. But why IIS Express recycles the app pool?
I have tried to track down the reason according Scott Gu post but the error is the viewer is yet again a nonsense :
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
The only thing that speaks to me is
_shutDownMessage=Change in App_Offline.htm HostingEnvironment initiated shutdown Change in App_Offline.htm
There are similar questions here on stackoverflow like this and this workaround and a probable answer here but I still do not get it - who is responsible for this and what is the main reason? Or there are different reasons for the different cases?
The only solution that worked for me is described here and it is more like a workaround with the desired side effect rather then full solution with proper explanation.
I did this and the problem disappeared.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With