Groups | Blog | Home
all groups > visual studio .net debugging > september 2005 >

visual studio .net debugging : Unable to start debugging on the web server. Access is denied.


Mek
9/15/2005 9:19:04 AM
I have a web server co-located at a hosting facility. I use Terminal
Services to connect to the server so that I can develop and debug "locally,"
and this has worked since I installed Visual Studio.

However, just recently we installed a firewall to deal with unauthorized
login attempts to our SQL server. Now, when I log in to Remote Desktop and
try to debug the web application, I get the following error:

"Error while trying to run project: Unable to start debugging on the web
server. Access is denied. Verify that you are an administrator or a member
of the 'Debugger Users' group on the machine you are trying to debug. After
being added to the 'Debugger Users' group, you must log off and log back on
for the setting to apply. Would you like to disable future attempts to debug
ASP.NET pages for this project?"

Now, it doesn't seem to make sense to me that the firewall would cause this
problem. Since I am not debugging remotely, the only packets passing through
the firewall should be HTTP requests for web pages on the server (if I'm not
mistaken), and I can browse to the server's home page in IE on the web
server, so that shouldn't be an issue. However, since we've never had the
problem before and it started as soon as we installed the firewall, I'm
fairly certain that it is causing the problem.

Also, I've tried every solution I can find online to fix this problem. I
have all the appropriate permissions, the ASPNET account is in both Debugger
Users and Administrators, the Machine Debug Manager process is running, I ran
aspnet_regiis.exe, and so on. I've also been using Filemon.exe to look for
any errors when I try to debug, and I'm not finding anything obvious. Unless
there's something I've missed (and I don't think there is), this is further
evidence that the firewall is the problem.

The problem is, I can't understand how the firewall could possibly be a
problem. Has anyone had similar firewall problems and solved them?
Otherwise, can you guys think of anything I should try that I haven't done
yet? If you can find it with a Google search, I've almost certainly already
tried it -- I've been spending the past three days wearing my fingers to the
bone with Google and MSDN searches.

Mek
9/15/2005 10:01:08 AM
One thing I forgot to mention -- I can start the project without debugging.
Jim
9/15/2005 2:50:40 PM
Mek,
I feel your pain. I've recently been there. I scoured newsgroups, MSDN,
....
Below are the steps I took to get remote debugging working between VS.NET
2003 Win XP SP2 station and a .NET application running in IIS on Windows
Server 2003 (SP1, I think).
I'm still not sure if the next to the last step is a good idea,
security-wise.
(9. Under 'Permissions for ANONYMOUS LOGON' select the 'Remote Access'
box. Click OK.)
Lots of luck!
Jim

I. Configure the Windows Server
A. Setting Up Remote Debugging (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vctskinstallingremotedebugmonitor.asp )


1. Use "preferred method" that employs DCOM and Machine Debug Manager.
2. Use "Full Remote Debugging" instead of "Native Remote Debugging".


B. ASP Remote Debugging Setup (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskaspremotedebuggingsetup.asp )
1. Added this key:
a)
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{6EB22881-8A19-11D0-81B6-00A0C9231C29}]
b) @="Catalog Class"
c) "DllSurrogate"=""


2. This key already present:
a)
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{6EB22881-8A19-11D0-81B6-00A0C9231C29}]
b) @="Catalog Class"
c) Added: "AppID"="{6EB22881-8A19-11D0-81B6-00A0C9231C29}"


C. Adding Debugger Users and Configuring DCOM (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsdebug/html/vxtskinstallingdcom.asp )


II. Configure the Workstation Running Visual Studio .NET
A. This may vary from workstation to workstation. Following are some
suggestions. Good luck!


B. Create a simple .NET application on the remote server for
trying/testing remote debugging:
1. HOW TO: Set Up and Use Remote Debugging in Microsoft Visual Studio
..NET ( http://support.microsoft.com/kb/318041 )
C. In IIS Manager on genome-mars, open properties for the web being
debugged. The web being debugged must be named. Also, 'Integrated Windows
authentication' must be enabled for the web.
D. Run DebuggerFirewall utility on workstation:
E. Description of the DebuggerFirewall utility that makes the Visual
Studio Remote Debugger work through the Windows XP Service Pack 2 firewall
(http://support.microsoft.com/?id=841177 )
F. In IE, add http://mars.genome.uab.edu (or the base URL associated
with your project) to trusted sites.
G. (IEàToolsàInternet Options.àSecurityàTrusted sitesàSites.)
H. Verify your membership in the 'Debugger Users' group on the server.
I. Enable 'Integrated Windows Authentication' for the web to be
debugged.
J. Verify that ASP.NET debugging is enabled in project properties.
K. Right click on 'Default Web Site' in IIS on Genome-Mars, select
properties, and ensure that 'Enable HTTP Keep-Alives' is selected.
L. On workstation running Visual Studio .NET, take the following steps.
(This advice came from http://support.microsoft.com/kb/833977/ , which
refers to debugging in Windows XP SP2, but it has been known enable remote
debugging between VS.NET on a XP SP2 workstation and IIS on a Windows Server
2003.)
1. Run 'dcomcnfg'.
2. Expand 'Component Services'.
3. Expand 'Computers'.
4. Click on 'My Computer'.
5. On the main menu, click on the 'Configure my Computer' button.
6. The 'My Computer' dialog box appears. Select the 'COM Security'
tab.
7. Under 'Access Permissions', click on the 'Edit Limits.' button.
8. Under 'Group or user names:' select 'ANONYMOUS LOGON'.
9. Under 'Permissions for ANONYMOUS LOGON' select the 'Remote Access'
box. Click OK.
10. A restart may be required to activate this settings change.


[quoted text, click to view]

Mek
9/16/2005 10:54:02 AM
Wow... long list. Good info there. However, if possible I'd like to stay
away from remote debugging for security reasons. Do you know of any similar
info on local debugging using Terminal Services?

[quoted text, click to view]
AddThis Social Bookmark Button