Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
369 views
in Technique[技术] by (71.8m points)

c# - 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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...