views:

689

answers:

5

Hi.

We have two Win2k3 servers here, one is a domain controller and the other our webserver.

I'm running an ASP.NET MVC web app setup as a website in IIS on the webserver.

I've copied across the x86 remote debugging tools to the webserver, logged in to an admin account and ran msvsmon. I added the user I'm logged into my workstation as to the permissions list.

Opened up the web app project in VS2008 and went to Attach to Process, here are my settings:

Transport: Default
Qualifier: OURDOMAIN\AdminUsername@OURWEBSERVER
Attach To: Managed Code

Selected: w3wp.exe

Upon clicking Attach, the windows flicker for a few seconds and then I get:

Unable to attach to the process. Access is denied.

I've tried right-clicking msvsmon and using Run As to run it under the same account as I'm logged into my machine, but still no difference.

However, if I change the Attach To field to Auto: Native Code, it attaches fine, but I can't debug any of my managed .NET code.

This has me baffled - any ideas?

Anthony

A: 

Is the code sitting precompiled on the server or in individual uncompiled .cs files?

Jaelebi
Precompiled. I've basically hit Build Solution in VS2008, then copied the bin folder to the server.
littlecharva
I think that might be the problem. Try putting the .cs files into the folder on the server instead of the precompiled files.
Jaelebi
No joy I'm afraid :(
littlecharva
+4  A: 

Have you seen this article?

http://support.microsoft.com/default.aspx?scid=kb;en-us;833977&Product=vsnet

Ty
+1 for the link.. Thats the most detailed article on setting up remote debugging I've seen. Thanks!
Zach Bonham
+1  A: 

It's not clear from your question, but remote debugging requires that the user you are logged into on the remote machine exist on your local machine as well. You basically have to create a local account on your dev machine (yes, that sounds backwards). I'm not sure it respects domain accounts.

Paul Mrozowski
Agree with this, and further, you must make sure that the users do not have *no passwords*. If they do, a special group policy needs to be set.
Noon Silk
A: 

I've tried right-clicking msvsmon and using Run As to run it under the same account as I'm logged into my machine, but still no difference.

Did you add that account as an administrator in the server? I would try that, and instead of doing Run As, I would effectively log in with that account.

When running server and client in different domains, the plot thickens slightly. In those cases, the trick I use is to create a local account with the same name and same password on both machines. Login with the same account (it is not really the same account) in both machines and launch the remote debugger on the server and VS on the client. If any of the machines in this scenario is running Windows XP, you have to change the Local Security Policy, "Network access: Sharing and security model for local accounts", under "Security Options", to "Classic - local users authenticate themselves".

Rui Craveiro
A: 

I have yet to see this work across domains. As with @paul-mrozowski, I've been able to do it on the same domain so long as the user running the debugger server matches your local user AND your able to properly auth against the machine. That last bit can be hampered by firewall configurations.

segy