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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/708323/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:19:55  来源:igfitidea点击:

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

asp.netvisual-studiovisual-studio-2008debuggingiis

提问by SevDer

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. (I don't know if I need some change here but I can't even try that)

同样在网站属性页面的启动选项中,服务器被选为“使用默认 Web 服务器”,自定义服务器呈灰色,我无法检查。(我不知道我是否需要在这里进行一些更改,但我什至无法尝试)

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". What? Anyway I get into the configuration manager of the solution and changed the mixed mode to ANY CPU, however no luck.

最重要的是,我尝试从默认页面进行调试,但在这种情况下,我得到的是“无法在 Web 服务器上开始调试。Windows 64 位平台不支持混合模式调试”。什么?无论如何,我进入了解决方案的配置管理器并将混合模式更改为任何 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.
  2. IIS 7 is used with Integrated mode.
  1. 我正在使用 DotNetNuke 5.0.1 并在其下构建模块。
  2. IIS 7 与集成模式一起使用。

采纳答案by SevDer

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. Additionally without the "Managed" option selected, you would never be able to debug anyway.

“Script”选项用于经典的 ASP 脚本,它总是在 32 位模式下运行,因此同时调试 T-SQL 和 Script 会导致“混合模式”,因为 T-SQL 默认为 64 位。此外,如果不选择“托管”选项,您将永远无法进行调试。

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.

现在,至于为什么不同?我不确定,但是一旦你改变它,你应该准备好迎接未来。

回答by Mitchel Sellers

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://localhostaddresses) 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.) 确保 Web 应用程序在 IIS 中完全运行,而不是在 Cassini(http://localhost地址)中运行 2.) 当附加到 w3wp.exe 进程时,请确保选择具有 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 techiemamma

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. Go to advanced settings, change "Enable 32-Bit Applications" to True. VS2010, Win 7 64 bit.

顺便说一句,对于其他人根据相同的错误消息(至少在我的情况下)找到这篇文章是修改 IIS 中的应用程序池。转到高级设置,将“启用 32 位应用程序”更改为 True。VS2010,Win 7 64 位。

回答by womp

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". Simply click the project in the solution explorer and hit F4 to bring up the properties window, and change it from "True" to "False". You might need to check all the projects in the solution.

1)webdev服务器自动启动:这通常是由于您的解决方案中的项目设置为“调试时始终启动”引起的。只需单击解决方案资源管理器中的项目,然后按 F4 即可调出属性窗口,并将其从“True”更改为“False”。您可能需要检查解决方案中的所有项目。

2) Attaching to a process should be done when the site is published to a real IIS, which I'm assuming you're doing. 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. If you're doing this, you shouldn't need to bother with the Start Page or using custom servers.

2) 应该在站点发布到真正的 IIS 时完成附加到进程,我假设您正在这样做。我并不完全熟悉 Vista 下的 IIS,但您需要深入了解并确保为您的 Web 应用程序启用调试。如果您这样做,您就不必为起始页或使用自定义服务器而烦恼。

Hope that helps some.

希望能帮到一些人。