Visual Studio 2010 won't allow me to debug web application - visual-studio

I have the .NET Target framework set to .NET Framework 3.5
When I try to debug with f5, i get the following message in a popup window:
"Unable to start debugging on the web server. Mixed-mode debugging of x64 processes is not supported when using Microsoft.NET Framework versions earlier than 4.0."
Of course when I set the target framework to .NET 4.0 it works fine. However my web server only supports up to 3.5 so I have to try and make this work with 3.5.
The closest match to a googled solution is found here:
http://msdn.microsoft.com/en-us/library/dd409790.aspx
however when I try to follow the steps to change the platform to x86, the setting it tells me to change simply isn't there. The closest thing is project properties -> Build -> Platform target, and that doesn't fix the problem.
What am I doing wrong?
THANK YOU FOR YOUR TIME

What you need to do is disable mix-mode debugging. That is simultaneously debugging native and managed code. That is what's causing the issue here.
Right click on the startup project and select properties
Go to the Debug tab
Uncheck the box which says "Enabled unmanaged code debugging"

Related

Unable to open visual basic 6 project on visual basic 8

I've created a project on VB6 at but when I am opening it on VB8, it shows the following error:
How to fix it?
As listed by GSerg in the comments, this appears to be a known issue documented in Microsoft Knowledge Base article 896292: You receive a "The remote procedure call failed" error message when you upgrade a Visual Basic 6.0 project to Visual Studio .NET 2003 or Visual Studio 2005 on Windows Server 2003 SP1 or on Windows XP SP2
To reproduce the solution here:
Cause
This behavior occurs because the VBU.exe tool has compatibility issues with the Data Execution Prevention (DEP) option.
Note: The VBU.exe tool starts when you upgrade the Visual Basic 6.0 project by using the Visual Basic Upgrade Wizard in the Microsoft Visual Studio .NET IDE.
Workaround
To work around this behavior, add the VBU.exe tool to the DEP exclusion list. To do this, follow these steps:
Click Start, click Control Panel, and then double-click System. The System Properties dialog box appears.
Click the Advanced tab, and then click Settingsunder Performance. The Performance Options dialog box appears.
Click the Data Execution Prevention tab. Verify that the Turn on DEP for all programs and services except those I select option is selected
Note By default, the Turn on DEP for all programs and services except those I select option is selected in Microsoft Windows Server 2003 Service Pack 1 (SP1).
Click Add. Locate and then click to select VBU.exe. Click Open.
In the warning box, click OK. VBU.exe now appears in the DEP program area.
Click Apply, and then click
OK. A dialog box appears that states that you must restart the computer for the setting to take effect. Click OK.
Try do divide your project to small projects(or comment large part of your project) a try again in each small project.
The idea is to find the function that is production the error.
My intuition is telling me that maybe is a DLL or OCX problem. Try to see all the external DLL or OCX calls and remove from the original project and try again the upgrading.
Most developers who move their VB6 projects to .Net do not even try to port them over. Even with third-party "conversion" software, the effort can be incredibly tedious. So much so, that most developers simply re-write the application completely. Consider it a move to a different language. In fact, some developers use that opportunity to port it to C# instead. I'm a die-hard VB6 user/fan but were I to attempt to port my 200 form accounting application, I'd just re-write it in C#. I started porting it, tried third-party conversion apps, just wasn't worth it.

Visual Studio Debugging is stuck at "Attaching to the web server"

When I run my Web API application I get the following window:
It just stays like that indefinantly, until I hit cancel.
When I do hit cancel, this error message is shown:
I have tried rebooting, and running iisreset /restart but it does not fix it.
Any ideas what I can do to get my debugger working again?
NOTE: My Web API 2 project's Servers setting is set to Local IIS. My service is hosted by IIS and when I am not debugging, it works fine.
A possible fix:
Check the "Enable Just My Code" in Tools->Options->Debug
I just did a reset for all the settings for VS and it worked again.
Tools => Import and Export Settings => Reset All Settings
good luck!
I had this issue for Visual Studio 2017 and like with the previous post I had Debugging option "Enable .NET Framework source stepping" ticked. Un-ticking fixed the issue.
So as I commented before I had this same issue, but I now figured out the cause and have a solution.
I just got a new machine last week (this issue was actually one of the reasons why) and after a while I had the same issues, not being able to debug my projects. Luckily because I was installing all the updates one by one I was able to pin-point when it started happening.
It seems the latest update for the "Microsoft ASP.NET and Web Tools" extension breaks something.
Sadly, uninstalling or reverting the Web Tools extension is not easy: Remove this extension by going to the Windows control panel and modifying your Visual Studio installation. I had to remove Visual Studio completely and reinstall it (repair didn't do the trick).
You can update and install all your extensions as you wish, just make sure that you don't update the Web Tools extension
I tested this on my old machine and it did the trick there as well.
I've also created an Issue on GitHub as I won't be updating the extension until this is fixed, if anybody has additional information please add it to the Issue.
In Visual Studio 2015, go to Tools -> Options -> Debugging and deselect "Enable .NET Framework source stepping". This may relate to an issue with loading symbols, so if you want to keep the ability to debug .NET Framework source, then it may help to search the web for how to clear the symbol cache, or preload it, or set your symbol server, and so on.
In Visual Studio 2017, I just restarted my machine and ran the solution, no other windows opened not even a browser, although visual studio took a long time to open (30+ projects in a solution) the problem did not reoccur.
I had the same issue in VS 2017 and un-checking 'Native code' did the trick. Not sure why it was checked.
In my case I set Debugging ->Symbols -> To "Load Only Specified Modules" to include the symbols for, in my case a devops symbols feed for some internal NuGet packages
Options>Debugging>Symbols>Load Only Specified Modules
By checking the option "Always load symbols where located next to modules" the setting won't mess with the regular/classic debugging in VS for your own code
This way the Symbols are still loading where needed and Visual Studio is not trying to load debugging information for all the IIS .net dlls that were loaded by w3wp
Alternatively it can also be configured to not load symbols for microsoft.*.dll and it will also work.
Didn't see this in the current answers, so thought I'd give my 2 cents in 2022:
What worked for me:
Make sure to check that your IIS application pool hasn't been stopped (and restart it if it is), and then if that's not the case, restart your IIS server.
If you don't where those settings are, open our Internet Information Services (IIS) Manager, Application Pools are in the left-hand column, and restart/start/stop your server is in the right column.

Current debbuger framework configuration

Somenone knows why I get this message when I'm debugging an attached ASP.NET 2.0 application ?
An unhandled exception was raised from Microsoft .NET Framework v1.0, 1.1, or 2.0, but the current debugger is configured to debug Microsoft .NET Framework v4.0 code. Examine the exception using the SOS tool.
I have .NET 4.0 installed, the application are running in a a IIS7.
Assuming that you are using visual studio 2010
When attaching to the process for debugging you should select the type of code:
The default is managed (v4.0) code
Other options are:
Managed (v2.0, v1.1, v1.0)
Native
Script
SilverLight
T-SQL
workflow
When you've attached to your debugger, you need to check the right framework version. For example, click Debug -> Attach to Process and it will bring up the Attach to Process window. It should have a Select button to select the type of code to debug. Select the Managed (v2.0, v1.1, v1.0) code option and then attach to the process you want to debug.

VS2010: "Unable to start debugging"

My VS2010 debugger has stopped functioning suddenly today on my Dell M4500. I had reinstalled VS2008 SP1 last week, but the 2010 debugger ran fine since then, so I'm not sure its the culprit.
I can launch a project once just fine, & afterwards I get a message that reads "Unable to start debugging," without any error # or explanation of why. Doing IISRESET doesn't help, I get the same message until I close VS with the entire solution and reload it. Here are some things I've tried:
Verified I have the latest project files
Repair option for VS2010
Complete uninstall/reinstall VS2010
Replaced Web.config with known good copy
Added localhost to the list of trusted sites in IE
Performed \aspnet_regiis -i in the 2.0 & 4.0 directories
Through IIS Services Mgr -> Default Website:
verified Enable HTTP Keep-alives checked
placed check in Integrated Windows authentication
Ensured Debug on "Any CPU" is selected
Tried building to Platform targets "Any CPU," "x86" & "x64"
Added DisableLoopbackCheck registry key entry in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Tested under both IIS & VS Development web server
Does anybody have any suggestions I can also try? Any help is very greatly appreciated!
Just a side note. I got a similar error in VS2013 trying to attach to chrome the error was:
Unable to attach the application 'chrome.exe' using XXX The 32 bit
version of the visual studio remote debugging monitor (msvsmon.exe)
cannot be used to debug 64 bit processes or 64-bit dumps. Please use
the 64-bit version instead
I had to untick "Silverlight" in the web project Web section:
I received this same message, preventing my web project from running and opening in a browser. Turns out another developer had made a change in the project properties to "Use Custom Web Server" which pointed to an external URL instead of to the web server on my machine.
Try this:
Right-click your project in Solution Explorer - click Properties - click Web tab - under Servers click "Use Visual Studio Development Server". For reference the usual port value here is "Auto-assign Port". Best of luck.
Here's why I got this error.
In Debug properties, verify that Start external program is not empty.
VS 2010 will warn you about it being empty, but will let you save it
I was trying to switch it from IE to Chrome, lost track of changes I was making, and spent an hour trying to figure out where this error was coming from.
I had the same issue but it worked when I switch Build => Platform target from x64 to x86.
Kindly turned off Debug Edit and Continue option
Turn on vs2010, run debug.
turn off debug, shut down all lunched webServers (i had few of them for different services)
Turn off VS2010
Turn on VS2010.
After that everything works perfect.

Issues debugging Moles

I’m using visual studio 2008 and moles version 0.93. Everything works well except when I try to debug any test that uses a Moled type. The test skips all my breakpoints. And I get the following message in the output window:
Unable to attach. Check for one of the following.
The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
The Microsoft .NET Framework version specified by you for debugging is incorrect
Please see the Visual Studio .NET debugger documentation for correctly specifying the Microsoft .NET Framework version your application is going to use for debugging.
If I try debbuger.Break () I get a message: "No symbols are loaded for any call stack frame. The source code cannot be displayed."
I’m in a crunch right now chasing an issue with one our main components and it has been a pain (like I need novocaine) trying to figure anything out without being able to step through the code.
I want to take advantage of mole's "smooth debugging experience". However, I can't seem to get the debugger to attach at all.
Thanks,
Bzz
See the solution to this issue here:
http://social.msdn.microsoft.com/Forums/en/pex/thread/91c08bf4-3260-458c-a221-91f030a75499
I had this problem when I moved a project from Visual Studio 2010 to Visual Studio 2008. Here's what I did to fix it.
Close Visual Studio. Navigate to the Debug/bin location. Delete the following files:
*.vshost.exe
*.vshost.exe.config
*.vshost.exe.manifest
Open the solution. Goto the project Settings. Under the Application Target Framework, select a framework lower than the one you are working with (you'll set it back later). Visual Studio will close and re-open your project automatically. Then set the Target Framework back to the original version you were working with. Rebuild all, and debugging will work properly.

Resources