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

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:
I am using DotNetNuke 5.0.1 and building modules under that.
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.

Related

Classic ASP, IIS8 & VB6

I was hoping to get some people's expertise as I'm currently outside my main domain. I'm currently working for a client that has an old system written in VB6 COM Objects. They use these to do basic Database interaction. These COM Objects are used in a Classic ASP website.
I've been tasked with getting the site up, running and in a build-able environment (Windows 8.1 is what they want to use).
I've been working through all the blockers associated with this and I believe I have it in a running state (as in I've configured IIS and been able to run the website, log in and click around and so far nothing has crashed).
I can make changes to the code in Visual Studio 6 Enterprise and those changes are working so I'm confident I've got that about 90% of the way there.
I've now got 2 problems both somewhat related:
Problem 1:
Problem 1 is now debugging, both the ASP & the VB code.
I can put a break point in the VB code and 'Step-Into' it (to attach) and then run the site and the code that runs in the global.asa file gets run and hits that breakpoint no worries, can step through as I would expect.
The problem then comes when I go to 'login' to the system. I use the same user/password that works if I'm not 'attached' the system crashes with a "An unhandled exception ('Error in loading DLL') occurred in w3wp.exe [3284]." - If i try to load up a debugger from this Visual Studio 6 is not an option in the list. If I then detach and I can do everything as before.
Does anyone know what could be causing this? Or have another way to be able to debug/step through this?
Problem 2:
They had previously been 'running' the website through Visual InterDev 6.0 - they could add breakpoints to the Classic ASP code and be able to step through then into the VB components.
The problem is that although I can install InterDev on my machine, I can't actually set it up. It appears to need FrontPage Server Extensions which although they can be 'installed' on IIS 8.5 they don't seem to be officially supported by Microsoft. So I've managed to install it without any issues but it doesn't seem to be configured in the same way that InterDev needs it to be able to setup a solution file/run from it.
My Question is this: Has anyone been able to configure FrontPage Server Extensions in a way that InterDev works?
OR is there any other tools I could use to 'run' a Classic ASP site that would allow me to debug it properly.
Let me know if you need any more information.
Thanks in Advance,
Michael
I think you actually don´t need Interdev in order to debug the classic ASP code. Just create a blank solution in Visual Studio and add all the classic ASP files from the virtual directory (editor and debugging capabilities for classic ASP files are still supported, even in the latest version of Visual Studio).
I assume you run the web application in your local IIS... once you have the solution, open the script of interest, put some breakpoints and than attach the Visual Studio debugger to the web server´s worker process (which should be w3wp.exe). Maybe you need to manually select the Script code type (automatic code type detection might not work).

Visual Studio 2010 displays IIS 7 page on debug instead of my project

This is my first ASP.NET project so I am a bit of a rookie when it comes to a lot of the configuring of IIS/Visual Studio so bear with me...
I am using Visual Studio 2010 running on Windows Server 2008 SR2. We recently did some updates on the server and now my project no longer loads when I attempt to debug. When I try to debug the default "Welcome" page for IIS 7 loads instead of my project. I am set up to use the development server to debug, not IIS so I don't understand why I get the IIS page. Before the updates the debugger was pulling up my page without any issues.
Any ideas? Thanks in advance!
It looks like IIS is now bound to the port number that Visual Studio Development Web Server was using previously. You can change the port number in the properties of the web site project.
I have found a solution to my issue. I decided to use IIS instead of the Development Server for debugging. After attempting to debug unsuccessfully yet again, I took a look at the identity that was being used in the application pool and I changed to one with more privileges and that seemed to do the trick. Thanks for the suggestions.
I had the same problem but non-of the earlier answers worked.
I am using Windows 7 enterprise 64-bit, IE11, VS2010, Silverlight 5
I have been developing and maintaining a number of Silverlight projects for the past 5 years, and have always been able to debug them within VS2010 using the ASP.NET Development Server. However, on returning from some well deserved holiday, I found that none of my existing Silverlight projects would run in the debugger. In each case there is a Web project set as the start-up project, and in each case on starting the project within VS2010 (with or without debugging) I got the IIS7 web page instead of my application.
I tried creating a new Silverlight web application, and found that this started normally in the ASP.NET Development Server. I checked my source code and found that no changes had been made in my absence.
After a lot of head scratching, etc., the solution was to clear the IE cache. These are the explicit steps I used:
Close all instances of IE and ASP.NET Development Server.
Open Internet Properties from the Control Panel.
Click "Delete" on the General Tab.
In the Delete Browsing History box check the following options:
a) "Preserve Favourites website data"
b) "Temporary Internet files and website data"
c) "Cookies and website data"
Leave the others unchecked
5) Click "Delete" and wait for the command to complete.
6) Close the Internet Properties box.
7) Rebuild ASP.NET project
8) Start (with or without debugging) in VS2010 - it should now load normally.
Hope this works for you.

Debugging ASP.NET in IIS 7

I have searched all the usual but come up empty. I must be doing something silly!
Simply I created a new project, ASP.NET Web App, and wish to use and debug it with the local install of IIS 7.5 on my Windows 7 x64 box.
According to what I have read it should be a simple process; my issue is that Visual Studio will not stop at breakpoints nor at errors etc.
I just don't get it:
Visual Studio is attaching to the w3p process for me automatically.
If I hover over the breakpoints it shows a message saying the same, that it is in the same w3p process.
I am in Administrator context. I manually ran it like so to be sure but in any case if you are an admin it runs like that anyway.
Some notes:
I do not wish to use IIS Express as I require native IIS 7.5 for my tasks, however it does debug in express - no surprise there.
As mentioned above, all this is being done locally.
The path of the virtual directory is pointed towards the project files, as set by Visual Studio 2010. It even set the Network Service as read on the folder structure.
When debugging from VS the web site runs fine, just debugging is the issue.
Maybe it is permissions? The Default App Pool is using the ApplicationPoolIdentity not Network Service... Should it be? I had assumed they we.re one and the same essentially. Although I changed this and no luck unless I didn't do something I should of
Keep in mind here that my issue is semi-unique in that I am not receiving error messages, not even in the event logs... For all intents and purposes it should be working fine, just it isn't.
VS and IIS, and all updates, are applied to date.
Note: I'm familiar with IIS7.5, I run my own public web hosting server. I just never tried to debug
Note: It is Visual Studio 2010 Ultimate
Thanks for your time.
Sigh!
I went back to basics... Uninstalled IISExpress and tested; It worked! Re-installed IISExpress; It worked!.
I guess installing IIS7 native after IISExpress did something screwy? I had ran the register ISS command on IIS7 when I installed it.
Right, so now I have both installed in tandem and they work fine. Thanks for all your help guys, appreciated.
you can try right-click on project in VS go to properties select web from left menu tab. Check if ASP.NET debugger is checked and also you can select Use Local IIS Server and give localhost url there (in project Url textbox) and then Say start debugging from VS and put breakpoints.
I had a similar issue the other day, I attached the debugger to the wrong w3p process, make sure you attach it to the one the app pool identity is running under.
I wanted to write it as comment by I don't think I can add pictures..
Are you sure you are running the same version of dll?
Is your breakpoint filled like this?
or hollow like this?
1st go to ,Program and Feature in control panel and then in that turn on or off windows features. and now check all check boxes(activate features) related to Internet Information server & windows service managers. once this is done run your visual studio as administrator and then attach to right w3p process.

VS2010 Ultimate - Unable to launch ASP.NET Development Server

I've worked with ASP.NET once before and had a project where it was potentially useful, so I started creating an ASP.NET website as part of a solution that contained several C# class libraries.
I'm using Visual Studio 2010 Ultimate Edition and Windows 7 Professional x64. The issue is that when I try to debug my website project, I get the following error message:
Unable to launch the ASP.NET Development Server
There's no other information (it seems a popular variant is the "port in use" error).
Interestingly, I can run single pages on the application by right-clicking on the ASPX and selecting "View in Browser". This does not allow me to debug into my breakpoints, though.
I have no clue what the problem could be. I'm running VS2010 in Administrator mode. One of the questions that popped up here suggested I uncomment the "127.0.0.1 localhost" line from my HOSTS file, which I did, and restarted VS with no luck. I also tried both setting a static port for the web server to run on as well as let it dynamically generate one. Both do not help the situation.
Any help?
Thanks.
Added on 5/20/2010 at 9:25 CT
I can debug by attaching to the process. However, this is still a painful way to debug quickly so I'd still like a solution to the problem.
There are some things to check before listed here
Please eliminate issues on the link and check whether you may debug
Hope this helps
Myra
The problem was I had a InstallShield Lite project which was apparently causing problems. Once I unloaded that project, I can launch the development server in debugging mode.

"Data Execution Prevention" kills (VS2008) local ASP.Net Development Server (aka Cassini) on Vista 64

Occasionally, I find that while debugging an ASP.Net application (written in visual studio 2008, running on Vista 64-bit) the local ASP.Net development server (i.e. 'Cassini') stops responding.
A message often comes up telling me that "Data Execution Prevention (DEP)" has killed WebDev.WebServer.exe
The event logs simply tell me that "WebDev.WebServer.exe has stopped working"
I've heard that this 'problem' presents itself more often on Vista 64-bit because DEP is on by default. Hence, turning DEP off may 'solve' the problem.
But i'm wondering:
Is there a known bug/situation with Cassini that causes DEP to kill the process?
Alternatively, what is the practical danger of disabling Data Execution Prevention?
The only way to know for sure would be to dig through the Cassini source and see if there are any areas where it generates code on the heap and then executes it without clearing the NX flag.
However, instead of doing that, why not use IIS?
EDIT:
The danger of disabling DEP is that you open up security holes. DEP works by not allowing arbitrary generated code on the heap to be executed. This helps prevent malware programs from inserting code into the data segments of legit programs.
You are on vista, iis got better (7), cassini stayed crappy.
So just start this app on iis with a host header and a hosts file entry.
You can grant certain programs exclusion from DEP if you need.
As Jonathan
mentions this does open up any vulnerabilities that application may have.
Using IIS in Visual Studio isn't the pain in the ass that it used to be in 1.1/VS02/03 days. There are lots of good reasons to prefer IIS over the Cassini server (articles by Dominick Baier):
Cassini considered harmful
Another Reason why I would not recommend Cassini
Dominick is 'the man' when it comes to IIS and security stuff.
When using IIS for a web app, I always create the app in IIS first, point it at my preferred folder, then get VS to create the project. This means you don't end up cluttering c:\inetpub\wwwroot with your web apps.
Of course, now we have IISExpress which if you're targeting IIS7.x it's the obvious choice for developing ASP.NET applications in Visual Studio.
Thanks for the answers. I guess I developed such an aversion to IIS in the .net 1.x era that I've refused to consider re-using it -- until now.
aside: when choosing between two equally acceptable answers from ChanChan and Jonathan, I arbitrarily marked Jonathan's as 'accepted' because a) he got in first and b) his rep is currently lower.

Resources