I develop a site on my local box using VS.NET 2013 and I have IIS pointing to my local drive where the files are. My site requires me to login, so I'll login and navigate to a page. If I see a style on that page that needs to be fixed, I'll edit the css file and try to refresh the page in my browser. But the site kicks me off and forces me to login again, which is caused by the IIS site recycling because of the .css file edit.
Is there a way to prevent it from recycling for a css file edit? I noticed that I can usually modify .aspx pages without the recycle. The site is a mix of ASPX and MVC pages.
Update
I develop in VS.NET, but I don't run it on my box thru IIS Express, but thru IIS itself.
I am only editing the .css file and eventually after a few saves, the site recycles. I've also tried editing the .css file in notepad and those edits eventually recycle the site as well.
I did add ScottGu's code (http://weblogs.asp.net/scottgu/433194) to Application_End() that logs what the shutdown reason was, and what it is reporting is the following:
_shutDownMessage=Change in App_Offline.htm
HostingEnvironment initiated shutdown
Change in App_Offline.htm
Change in App_Offline.htm
Change in App_Offline.htm
Change in App_Offline.htm
Change in App_Offline.htm
Change in App_Offline.htm
Change in App_Offline.htm
HostingEnvironment caused shutdown
_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
at System.Web.HttpRuntime.OnAppOfflineFileChange(Object sender, FileChangeEvent e)
at System.Web.DirectoryMonitor.FireNotifications()
at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
I don't know how app_offline.htm is getting modified as I am not touching it. In fact, I do not have a file named app_offline.htm because if I did, I would not be able to see the site/login/etc.
Sounds like I need to get a file watcher and see who is touching it, but I suspect something else is touching app_offline.htm in order to trigger a recycle.