简体   繁体   English

尝试使用 Visual Studio 2008 附加到 ASP.NET 进程时,“Windows 64 位平台不支持混合模式调试”

[英]“Mixed mode debugging is not supported on Windows 64-bit platforms” when trying to attach to an ASP.NET process using Visual Studio 2008

I am so used to attach a process when debugging ASP.NET application in .NET 2.0 and VS.NET 2005. I don't know what happened to this functionality in VS.NET 2008.在 .NET 2.0 和 VS.NET 2005 中调试 ASP.NET 应用程序时,我习惯于附加一个进程。我不知道在 VS.NET 2008 中这个功能发生了什么。

I also don't want to do debugging by starting from the start page because when the application is big enough you don't want it to be compiled and you sometimes cannot catch a case from start and you want to catch that case during that time.我也不想从起始页开始进行调试,因为当应用程序足够大时,您不希望它被编译,并且有时您无法从一开始就捕获一个案例,而您想在那段时间捕获该案例.

I could't figure this one out.我想不通这个。

I am running Vista Ultimate x64 with VS.NET 2008 Team Suite.我正在使用 VS.NET 2008 Team Suite 运行 Vista Ultimate x64。

Also in the start options of the WebSite Propery pages Server is selected as "Use Default Web Server" and custom server is grayed out which I cannot check.同样在网站属性页面的启动选项中,服务器被选为“使用默认 Web 服务器”,自定义服务器显示为灰色,我无法检查。 (I don't know if I need some change here but I can't even try that) (我不知道我是否需要在这里进行一些更改,但我什至无法尝试)

On top of it, I tried debugging from default page but in that case what I got is "Unable to start debugging on the web server. Mixed mode debugging is not supported on Windows 64-bit platforms".最重要的是,我尝试从默认页面进行调试,但在这种情况下,我得到的是“无法在 web 服务器上开始调试。Windows 64 位平台不支持混合模式调试”。 What?什么? Anyway I get into the configuration manager of the solution and changed the mixed mode to ANY CPU, however no luck.无论如何,我进入解决方案的配置管理器并将混合模式更改为任何 CPU,但没有运气。

Going without the help of debugging brings down ASP.NET to the level of PHP or other kinds.没有调试的帮助将 ASP.NET 降低到 PHP 或其他类型的级别。

Additional notes:补充说明:

  1. I am using DotNetNuke 5.0.1 and building modules under that.我正在使用 DotNetNuke 5.0.1 并在其下构建模块。
  2. IIS 7 is used with Integrated mode. IIS 7 用于集成模式。

The key that I have found on 64 bit Vista for debugging is the following.我在 64 位 Vista 上找到的用于调试的密钥如下。

1.) Ensure that the web application is FULLY running in IIS and not Cassini ( http://localhost addresses) 2.) When attaching to the w3wp.exe process, be sure to select the one with a type of T-SQL, Managed, x64 and NOT the one that shows a type of just x64 1.) Ensure that the web application is FULLY running in IIS and not Cassini ( http://localhost addresses) 2.) When attaching to the w3wp.exe process, be sure to select the one with a type of T-SQL,托管,x64,而不是仅显示 x64 类型的

Following these two steps I have gotten around all of the issues that I have had.按照这两个步骤,我已经解决了我遇到的所有问题。 Similar to those you list above.类似于你上面列出的那些。

By the way, for anyone else finding this article based on the same error message (at least in my case) was to modify the app pool in IIS.顺便说一句,对于基于相同错误消息(至少在我的情况下)找到这篇文章的其他人来说,是修改 IIS 中的应用程序池。 Go to advanced settings, change "Enable 32-Bit Applications" to True. Go 为高级设置,将“启用 32 位应用程序”更改为 True。 VS2010, Win 7 64 bit. VS2010,Win 7 64位。

Okay, it sounds like you're suffering from a couple problems.好的,听起来您遇到了几个问题。

1) Automatic startup of the webdev server: This is usually caused by a project in your solution being set to "Always start when debugging". 1) webdev 服务器的自动启动:这通常是由于您的解决方案中的一个项目设置为“调试时始终启动”引起的。 Simply click the project in the solution explorer and hit F4 to bring up the properties window, and change it from "True" to "False".只需在解决方案资源管理器中单击项目并按 F4 以显示属性 window,并将其从“True”更改为“False”。 You might need to check all the projects in the solution.您可能需要检查解决方案中的所有项目。

2) Attaching to a process should be done when the site is published to a real IIS, which I'm assuming you're doing. 2) 当网站发布到真正的 IIS 时,应该附加到进程,我假设你正在这样做。 I'm not totally familiar with IIS under Vista, but you'll need to go into it and make sure that debugging is enabled for your web application.我对 Vista 下的 IIS 并不完全熟悉,但您需要将 go 放入其中,并确保为您的 web 应用程序启用调试。 If you're doing this, you shouldn't need to bother with the Start Page or using custom servers.如果您正在这样做,则无需费心使用起始页或使用自定义服务器。

Hope that helps some.希望对一些人有所帮助。

Help came from Mitchel Sellers.米切尔·塞勒斯提供了帮助。 He pointed out that the debug mode was ok however while attaching to the process, the "Attach To" was "Automatic:Native Code".他指出调试模式没问题,但是在附加到进程时,“附加到”是“自动:本机代码”。

After changing to only "Managed Code" or simply by selecting "Managed Code" it started working.更改为仅“托管代码”或仅选择“托管代码”后,它开始工作。

Thanks Mitchel.谢谢米切尔。

And here is the final words from Mitchel:这是米切尔的最后一句话:

The "Script" option, is for classic ASP scripts, which ALWAYS run in 32 bit mode, thus debugging T-SQL and Script at the same time results in the "mixed mode", as T-SQL is 64 bit by default. “脚本”选项用于经典的 ASP 脚本,它总是在 32 位模式下运行,因此同时调试 T-SQL 和脚本会导致“混合模式”,因为 T-SQL 默认为 64 位。 Additionally without the "Managed" option selected, you would never be able to debug anyway.此外,如果没有选择“托管”选项,您将永远无法调试。

Now, as to why it was different?现在,至于为什么不同? I'm not sure, but once you change it you should be set to go for the future.我不确定,但是一旦你改变它,你应该设置为 go 以备将来使用。

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

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