如何在Visual Studio 2015上恢复MVC项目调试? [英] How do I restore MVC project debugging on Visual Studio 2015?

查看:91
本文介绍了如何在Visual Studio 2015上恢复MVC项目调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里遇到了紧急情况:我正在使用VS 2015中的ASP.Net MVC 5开发一个Web应用程序,突然之间我无法在调试时运行它;我不知道出了什么问题。



- 使用IIS Express v.10

- Visual Studio Community 2015;版本14.0.23107.0 D14REL;框架4.6.00081

- Windows 7企业版



症状和观察:



1)如果我没有调试运行项目(CTRL + F5),一切都很好。

2)问题是只运行F5(调试模式)。运行后:浏览器打开,等待,关闭,Visual Studio停止项目。

3)IIS Express系统托盘图标永远不会显示,之前没有发生过。当使用CTRL + F5运行时,它会显示并且网站运行正常。

4)所有浏览器,所有项目(旧的和新的)都会发生这种情况。

5 )输出窗口显示以下消息:



------------------------- -------------------------------------------------- -----

显示输出:Debug

程序'[6468] iisexpress.exe'已退出,代码为-1073741819(0xc0000005)'访问违规'。

程序'[7972] iexplore.exe'退出时代码为-1(0xffffffff)。

-------------- -------------------------------------------------- ----------------



步骤已经采取(并且没有骰子):



- 怀疑内存模块坏了,执行了很多内存基准测试:一切都很好。

- Visual Studio工具菜单\导入和导出设置:重置所有设置。

- 卸载VS,清理注册表,重新安装(确保这样做作为管理员')。

- 确保我以管理员身份运行所有实例。

- 在项目的Web设置上更改端口号。

- 尝试将更改策略更改为不受限制(Powershell)。

- 卸载IIS Express 10并重新安装它。

- 去Visual Studio论坛并发布问题(仍然没有答案)

- 来这里寻求帮助;-)



在我看来,Visual Studio 2015调试器发生了一些事情,现在每当我运行一个ASP.Net项目,调试器似乎已经失去了唤醒IIS Express的方法。因此,由于它不活动,项目无法找到服务器并且项目关闭...

我很感激你的时间!

解决方案

< blockquote>找到了解决方案!!



请保护你的屏幕,然后对你将要阅读的内容作出反应(笑)...



所以我一直在互联网上查找可能的解决方案(3天后),发现有人建议去为DEVENV.exe添加例外。我做了,但仍然没有骰子。所以我关闭了防火墙和防病毒软件!项目再次以调试模式运行!!所以,是的,所有技术信息,以找出答案与防病毒和/或防火墙有关。



所以解决这个问题的实例(我我发现在不同的情况下,其他人会发现同样的错误),就是做以下简单而明显的步骤,我很遗憾地说很遗憾,我忽略了:



- 关闭Visual Studio

- 关闭防火墙和防病毒软件

- 重新打开Visual Studio,打开项目并清理并重建它。

- 运行项目

- 如果有效:

1)在防火墙中为DEVENV.exe添加例外(可在Visual Studio安装文件夹中找到)程序文件)。

2)在防火墙中为IIS Express添加另一个例外(\Program Files \ IIS Express:iisexpress.exe,appcmd.exe,IisExpressAdminCmd.exe,iisexpresstray.exe)。

3)在您的ANTIVIRUS程序中为Visual Studio添加一个例外安装文件夹(不仅仅是devenv.exe,我已经完成了但仍然无法工作)。

4)最后,在你的防病毒程序中为Program Files中的IIS Express文件夹添加一个例外。



- 如果不起作用:抱歉!!!但是请发帖!也许我们仍然可以找出问题所在。



谢谢大家抽出时间帮忙!!上帝保佑!!


I have an emergency here: I'm developing a web app using ASP.Net MVC 5 in VS 2015 and all of the sudden I can't run it while debugging; I don't know what has gone wrong.

- Using IIS Express v.10
- Visual Studio Community 2015; Version 14.0.23107.0 D14REL; Framework 4.6.00081
- Windows 7 Enterprise

Symptoms and observations:

1) If I run the project without debugging (CTRL + F5), everything's fine.
2) Problem is running it with only F5 (debugging mode). What happens is that after running: the browser opens, waits, closes, Visual Studio stops the project.
3) The IIS Express system tray icon is never displayed, which didn't happen before. When running with CTRL + F5, it is displayed and the site runs fine.
4) This happens with all browsers, all projects (both old and new).
5) The output window displays the following message:

--------------------------------------------------------------------------------
Show output from: Debug
The program '[6468] iisexpress.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.
The program '[7972] iexplore.exe' has exited with code -1 (0xffffffff).
--------------------------------------------------------------------------------

Steps already taken (and no dice):

- Suspecting a bad memory module, performed many memory benchmarks: everything's fine.
- Visual Studio Tools Menu\Import and Export settings: reset all settings.
- Uninstalled VS, cleaned registry, reinstalled (making sure was doing so 'as administrator').
- Made sure I was running all instances as Administrator.
- Changed port number on the Project's Web settings.
- Tried changing policies to unrestricted (Powershell).
- Uninstalled IIS Express 10 and reinstalled it.
- Went to Visual Studio forums and posted the problem (still no answer)
- Came here looking for help ;-)

In my opinion, something happened with the Visual Studio 2015 debugger and now whenever I run an ASP.Net project, the debugger seems to have lost the way to wake IIS Express. Therefore, since it's not active, the project can't find the server and the project closes...
I appreciate your time!

解决方案

Found the solution!!

Please protect your screen before reacting to what you're about to read (lol)...

So I kept on looking on the Internet for possible solutions (after 3 days of this) and found one suggesting to go and add an exception for DEVENV.exe. I did, but still no dice. So I turned off both firewall and antivirus and voilá! Project runs in debug mode again!! So yes, all that technical information to find out that the answer was related to the antivirus and/or firewall.

So the solution to THIS INSTANCE OF THAT PROBLEM (I've found that the same error occurs to others in difference circumstances), is to do the following simple and obvious steps, which I regret with a lot of shame to say, I overlooked:

- Close Visual Studio
- Turn off both Firewall and Antivirus
- Reopen Visual Studio, open your project and clean and rebuild it.
- Run the project
- If it works:
1) Add an exception in your firewall for DEVENV.exe (found in the visual studio installation folder in Program Files).
2) Add another exception in your firewall for IIS Express (\Program Files\IIS Express: iisexpress.exe, appcmd.exe, IisExpressAdminCmd.exe, iisexpresstray.exe).
3) Add an exception, in your ANTIVIRUS program, for the Visual Studio installation folder (NOT only devenv.exe, I had done that and still didn't work).
4) Finally, add an exception in your antivirus program for the IIS Express folder inside Program Files.

- If it doesn't work: SORRY!!! But please post!, maybe we can still find out what's wrong.

Thank you all for taking the time to help!! God bless!!


这篇关于如何在Visual Studio 2015上恢复MVC项目调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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