简体   繁体   中英

“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.

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.

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)

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.

Going without the help of debugging brings down ASP.NET to the level of PHP or other kinds.

Additional notes:

  1. I am using DotNetNuke 5.0.1 and building modules under that.
  2. IIS 7 is used with Integrated mode.

The key that I have found on 64 bit Vista for debugging is the following.

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

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

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.

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.

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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