将Web应用程序附加到Visual Studio 2013中的IIS Express

编程入门 行业动态 更新时间:2024-10-28 08:19:35
本文介绍了将Web应用程序附加到Visual Studio 2013中的IIS Express的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在Visual Studio 2012中,如果我停止调试,则Web应用程序将保持与IIS Express的连接,这样我就可以继续在浏览器中加载页面,而不必重新启动调试.与.NET Demon结合使用时,这对我来说确实非常好,因为我的应用程序会在每次更改后重新生成,并且我可以直接跳到浏览器以立即检查更改.

In Visual Studio 2012, if I stopped debugging, the web application would remain attached to IIS Express, such that I could continue loading pages in the browser without having to restart debugging. This worked really well for me in conjunction with .NET Demon, as my application would rebuild after every change and I could just jump over to the browser to check the changes instantly.

升级到Visual Studio 2013后,此行为不再存在.当您停止调试时,该应用程序将完全分离,从而浏览器将生成一条错误消息,指出无法找到服务器.我发现经常不得不一直启动和停止调试非常烦人.有人知道这是否就是2013年的样子,还是我在某处缺少什么?

After upgrading to Visual Studio 2013, this behavior no longer exists. When you stop debugging, the application is completely detached, such that the browser will generate a error saying that it cannot find the server. I'm finding it very annonying to constantly have to start and stop debugging all the time. Does anyone know if this is just the way it is with 2013, or if I'm missing something somewhere?

编辑

好的,这很奇怪.显然,对于设置为启动项目的任何问题(或者由于是调试开始的项目而成为启动项目),这都是一个问题.调试停止后,无论我在其上开始进行调试的项目还是被设置为启动项目的项目,都与IIS Express完全无关.任何其他项目仍然可用.而且,如果我将所有项目都设置为启动项目,则在停止调试后,将无法使用任何内容,并且IIS Express托盘图标将完全消失.也许这是Visual Studio 2013和/或IIS Express 8中的错误?

Okay, so this is pretty weird. Apparently, it's only an issue for whatever is set as the startup project (or is the startup project by virtue of being the one that debugging was started on). Whatever project I start debugging on, or that is set as the startup project, is completely unattached from IIS Express after debugging stops. Any other projects are still available. And, if I set all the projects as startup projects, then after stopping debugging, nothing is available and the IIS Express tray icon goes away completely. Perhaps this is a bug in Visual Studio 2013 and/or IIS Express 8?

推荐答案

最后偶然发现了答案.如果在项目属性中启用了启用编辑并继续",则在停止调试时,Visual Studio将终止IIS Express进程,但如果禁用它,则IIS Express将继续运行.

Finally stumbled upon the answer. If you have "Enable Edit and Continue" enabled in your project properties, when you stop debugging, Visual Studio will kill the IIS Express process, but if you disable it, IIS Express will continue running.

结果表明,在VS2012中,此设置的默认值为 off ,这就是为什么我认为这应该可行的原因,但是在VS2013中,默认设置更改为在上.

Turns out, in VS2012, the default for this setting was off, which is why I sort of took for granted that this should just work, but in VS2013, the default was changed to on.

更多推荐

将Web应用程序附加到Visual Studio 2013中的IIS Express

本文发布于:2023-11-15 11:23:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1593995.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   Visual   Web   Studio   Express

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!