1
votes

I have VS2015 locally. Windows 2012 R2 server hosting an IIS8 test website.

I've put the updated DLL and PDB files in the BIN of the test website.

Step 1) On the remote server, I make sure the Remote Debugger is started.

enter image description here


Step 2) While in VS, I navigate to Debug => Attach to Process. Click "Find". Then click "Select"

enter image description here


This is when the error shows up "Unable to connect to 'address'. An operation is not legal in the current state."

enter image description here


I noticed the Qualifier port was changed, and is different than what shows in Step 1... so I try manually changing what's in the Qualifier to match.. but same issue.

enter image description here


I see the "Transport" is changed from Remote to WebKit. Not sure if this is a problem...

3
In step 2 put IP address of win2012 server and click find. It should prompt for user credentials (I use administrator in my debug environment). After presenting credentials it should display all processes running on windows2012. Select a w3wp.exe process that you want to debug.pepo
Did you ever figure this out? I tried the solution that pepo suggested and it didn't work. It sucks because I used to do this all the time with 2013 and it worked fine!jhammond

3 Answers

9
votes

I figured it out. Instead of choosing Remote in the Transport dropdown. Select Default and then put your server in the textbox. Even though I am doing remote debugging, it solved the problem.

0
votes

I got the same error while I tried to attached my solution with running localhost application hosted in iis. I just fixed it by selecting "Native code" in the "Attach to" field of the "Attach to Process" dialog.

0
votes

In my scenario, a process running on a machine behind firewall had to be debugged. Usual steps did not help in discovering the machine or its process by selecting the Remote (No Authentication) option.

The following steps helped in remote debugging the process with firewalls on:

  1. Run Remote Debugger on remote machine. The remote machine may have the firewall on. Leave Remote Debugger to run with Authentication Mode as Windows Authentication.
  2. On the debugging machine, go to Debug->Attach to Process, and leave Default in Transport drop-down. Enter the IP of the remote machine for Qualifier and press Enter. This will ask to provide credentials to log into remote machine. Provide credentials. Processes running on the remote machine should now be listed under Available Processes
  3. If the intended process on remote machine is not listed in Available Processes, check ""Show processes from all users"". This should show the process intended to be debugged.
  4. If the break points are not loaded or hit when expected, go to Tools->Options->Debugging-> Uncheck Enable Just My Code. Break points should now hit.

Hope this helps.

Can a moderator add tags remote debugging and remote debugging with firewall to this post, and remove this line?