views:

5543

answers:

4

Hi,

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.

This time MS made me really crazy.

Seeking urgent help as 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.

+4  A: 

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.

Mitchel Sellers
Hi Mitchel,I didn't understand the Cassini part. Actually I've modified my hosts file and added the following mysite 127.0.0.2 and setup the IIS for that (new site) and have this in Solution and opening that site http://mysite and then trying to attach that. Do you think this is the problem?
SevDer
If this is the problem, how to resolve it? What are your suggestions?
SevDer
With what you have listed that means that you are under IIS correctly. Did you by chance configure IIS to run in 32 bit mode?
Mitchel Sellers
Hi Mitchel, I've not done that. It is running purely under 64 bit.Actually everything works as expected except that debugging which is like a nightmare now.
SevDer
SevDer - Shoot me an e-mail with the screen that displays your running processes. [email protected]. (I'm doing a ton of DNN on Vista 64 bit without issue)
Mitchel Sellers
SevDer's answer below was spot on... Thanks new Install of Visual Studio and very much thanks to Mitchel Sellers for the answer :)
sdanna
A: 

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.

womp
1. I don't have such option actually. I simply have "Project File" and "Project Folder". For the web project I have "Full Path" and "Opened URL" and all are grayed out.2. Yes I am doing int in IIS and I always did. Debugging is also enabled. 2.
SevDer
Are you sure you have a web project? That sounds like a class library.
womp
I have a solution with class libraries and a web project.
SevDer
At least I've found that the "ASP.NET Development server" is starting because of a webservice I was having in the project. After disabling that feature I am ok with it. However still cannot debug.
SevDer
A: 

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.

SevDer
SevDer, then give the TICK to Mitchel instead of yourself :)
Pure.Krome
I would love to give it to Mitchel, but at the same time I would like to show what the real answer is to everyone else. Plust ticking yourself does not give you any points. At least in my case it didn't :).
SevDer
+1  A: 

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.

techiemamma