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

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

问题描述

我升级我的机器到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.

不过,在我真正的项目的问题依然存在:在Application_Start事件一个aspx或ascx的文件的更改结果被解雇。

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中注释掉为DevEx preSS控制,自定义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的集成,V4.0使用NetworkService身份

Applicationpool as Integrated, v4.0 with NetworkService as Identity

推荐答案

我不打算尝试采取信贷这一点,但答案被@的Anand

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变得更加敏感了。唯一的缺点是你从页面检查丢失的服务器端挂羊头卖狗肉。

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

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

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