简体   繁体   English

如何在Visual Studio 2013中使用IIS(而不是Express)进行调试

[英]How to debug with IIS (not Express) in Visual Studio 2013

This might be a stupid question, but I have a problem with Visual Studio 2013 and IIS (not Express), that the Visual Studio debugger by default uses IIS Express (iisexpress.exe) to debug code. 这可能是一个愚蠢的问题,但我遇到Visual Studio 2013和IIS(而不是Express)的问题,默认情况下Visual Studio调试器使用IIS Express(iisexpress.exe)来调试代码。 But I do not want that, but I want to use IIS installed on my computer (w3wp.exe). 但我不希望这样,但我想使用我的计算机上安装的IIS(w3wp.exe)。

I succeeded in debugging with IIS by using Attach to Process... and then selecting All Users and then picking w3wp.exe as a process. 我通过使用Attach to Process ...成功调试IIS,然后选择All Users,然后选择w3wp.exe作为进程。 But I need to do this every time I start debugging. 但是每次开始调试时我都需要这样做。 Is there a way to use IIS by default? 有没有办法默认使用IIS? In Visual Studio 2012, everything worked well, but in VS 2013 I cannot find an option to use IIS (w3wp.exe) by default. 在Visual Studio 2012中,一切运行良好,但在VS 2013中,我找不到默认情况下使用IIS(w3wp.exe)的选项。

I am debugging a Web Site ASP.NET 4.0. 我正在调试一个Web站点ASP.NET 4.0。

Thanks for any help! 谢谢你的帮助!

If your website project was opened via IIS, it should debug the IIS process automatically. 如果您的网站项目是通过IIS打开的,它应该自动调试IIS进程。 If your site exists in IIS currently, you should be able to find it via File -> Open -> Web Site. 如果您的站点当前存在于IIS中,您应该可以通过文件 - >打开 - >网站找到它。

If you opened an IIS Express based website project (or via the file system, which uses IIS Express by default), then run the site through IIS, VS doesn't know that the site is running in IIS. 如果您打开了基于IIS Express的网站项目(或通过默认情况下使用IIS Express的文件系统),则通过IIS运行该站点,VS不知道该站点在IIS中运行。

为了使我的设置(VS2013,IIS7,Win7)正常工作,我需要进入IIS管理控制台并手动启用Windows身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM