Search code examples
c#asp.netwindows-8iis-7.5visual-studio-2012

ASP.Net Inproc session restarted after markup change in VS2012


I upgraded my development machine to Windows 8 and Visual Studio 2012.

I'm testing my ASP.Net applications (also upgraded to .net 4.5) on a local IIS.

One thing that is annoying me, that hasn't been this way with my last configuration (Windows 7, VS 2010, .net 4.0), is that InProc-sessions are being restarted after changes in markup files.

Example: I'm logged into my local ASP.net application, make and save changes in a *.ascx file, refresh my webbrowser and the session is gone.

How do I turn off the session restart issue?

Edit: I tried to repro the issue with the new VS 2012 Web Application project template, removed unnecessary content and couldn't repro this issue.

However, in my real project the issue still remains: Changes to an aspx or ascx file result in the Application_Start event being fired.

I also stripped down the web.config in my real project to the bare minimum to look like the one in the new project, but that didn't allow me to remove the bug either. Things I commented out in the web.config were DevExpress Controls, custom healthMonitoring, IIS UrlRewrite 2

Applicationpool as Integrated, v4.0 with NetworkService as Identity


Solution

  • I'm not going to try to take the credit for this but the answer is buried in the 11th comment on the original question by @Anand:

    Add this key in web.config:

    <appSettings><add key="PageInspector:ServerCodeMappingSupport" value="Disabled" /></appSettings>
    

    and the problem goes away. VS becomes far more responsive too. Only downside is you lose the server-side trickery from Page Inspector.

    Hopefully MS will provide a fix soon..