ASP.Net Inproc 会话在 VS2012 中的标记更改后重新启动 [英] ASP.Net Inproc session restarted after markup change in VS2012

查看:28
本文介绍了ASP.Net Inproc 会话在 VS2012 中的标记更改后重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的开发机器升级到了 Windows 8 和 Visual Studio 2012.

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

我正在本地 IIS 上测试我的 ASP.Net 应用程序(也升级到 .net 4.5).

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

让我烦恼的一件事是,在我的上一个配置(Windows 7、VS 2010、.net 4.0)中并非如此,即在标记文件更改后 InProc 会话正在重新启动.

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.

示例:我登录到我的本地 ASP.net 应用程序,在 *.ascx 文件中进行更改并保存,刷新我的网络浏览器,会话就消失了.

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?

编辑:我尝试使用新的 VS 2012 Web 应用程序项目模板重现该问题,删除了不必要的内容并且无法重现此问题.

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.

但是,在我的实际项目中,问题仍然存在:更改 aspx 或 ascx 文件会导致 Application_Start 事件被触发.

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

我还将实际项目中的 web.config 精简到最低限度,使其看起来像新项目中的那样,但这也不允许我删除错误.我在 web.config 中注释掉的内容是 DevExpress Controls、自定义 healthMonitoring、IIS UrlRewrite 2

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

Applicationpool as Integrated, v4.0 with NetworkService as Identity

推荐答案

我不打算为此而努力,但答案隐藏在@阿南德:

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:

在 web.config 中添加这个键:

Add this key in web.config:

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

问题就消失了.VS 也变得更加敏感.唯一的缺点是您失去了 Page Inspector 的服务器端诡计.

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

希望 MS 能尽快提供修复..

Hopefully MS will provide a fix soon..

这篇关于ASP.Net Inproc 会话在 VS2012 中的标记更改后重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆