Groups | Blog | Home
all groups > visual studio .net debugging > january 2004 >

visual studio .net debugging : Access Denied error when attaching to aspnet_wp.exe process in native mode



marco NO[at]SPAM marcoganz.com
1/12/2004 2:15:27 AM
Hello there,

As stated in the subject line I'm getting the error

"Cannot connect to process. Access is denied."

when trying to connect to the local "aspnet_wp.exe" process from the
"Debug | Process" window in VStudio .NET 2002 (italian version), for
NATIVE projects (CLR ones debug fine).

My local account is member of the following groups:

- Administrators
- Debugger Users
- Utenti Debugger
- VS Developers

The ASPNET account is member of

- Users
- Debugger Users
- Utenti Debugger
- VS Developers


I can properly debug CLR projects and native code outside the
aspnet_wp.exe process.

I'm running on W2000 Advanced Server with the latest service pack.

..NET Framework is version 1.1.4322.

The problem seems to be specific to the "native" debugging inside the
aspnet_wp process and I couldn't find other postings on the subject.

I've also started the "Visual Studio Debugger Proxy" service.

Any suggestions?

Thank you already for your interest.

Habib Heydarian [MSFT]
1/13/2004 1:39:31 AM
Marco,

If I understand correctly, you are trying to attach to aspnet_wp.exe with
the native debugger, correct? Is this because you want to debug the
aspnet_wp.exe process itself or do you have an ASP.NET application that
calls into native C++ code and you want to debug that code? Otherwise, if
you're working on a native C++ web app (or web service) such as ATL Server,
then your code is not running in aspnet_wp.exe, but either in inetinfo.exe
or dllhost.exe (depending on your security settings).

Unless you have changed the process model for aspnet_wp.exe, it should be
running under the ASPNET account by default. If this is true, then all you
need to make sure is that the user running Visual Studio is a member of:

- Administrators
- Debugger Users

The Visual Studio Debugger Proxy service is required to allow you to detach
from native processes on Windows NT and 2000. It's not required if you're
debugging on Windows XP and Windows Server 2003.

HabibH.

[quoted text, click to view]

marco NO[at]SPAM marcoganz.com
1/13/2004 6:53:26 AM
Hello Habib,

[quoted text, click to view]

That's it: what I really need is to debug my own ATL server which is
referenced by a C# web service. Inside VS.NET I enabled "native" and
"aspnet" debugging in the properties of my C# project but as soon as I
start it (in debug mode of course) I get following error message:

"Impossibile avviare il debug sul server Web. Non si dispone dei
privilegi necessari per eseguire il debug dei processi sul server
Web."

(something like "cannot start debugging on the web sever. You do not
have privileges to debug the web server process.")

I can properly debug the C# web service by disabling "native"
debugging inside its properties.

The folders containing the source code for the ATL server are readable
by Everybody.

I noticed the "Access Denied" message when connecting to the
aspnet_wp.exe process and I thought the problem could be related.

[quoted text, click to view]

My task manager shows one aspnet_wp.exe process running under the
ASPNET username.

[quoted text, click to view]

As I wrote in my original message the user running VS is already
member of both groups in addition to the "VS Developers" one.

[quoted text, click to view]

Noted. I'm indeed running Windows 2000 Advanced Server with the latest
SP.

Any other suggestion please?

Cheers

-- Marco --

PS: I can correctly debug my ATL server when referenced by a C#
console application (i.e. no aspnet involved).


[quoted text, click to view]
Habib Heydarian [MSFT]
1/13/2004 7:18:08 AM
Can you add the ASPNET account to the Administrators group and let me know
whether that works?

HabibH.

[quoted text, click to view]

marco NO[at]SPAM marcoganz.com
1/14/2004 2:49:55 AM
Hi Habib,

I've added ASPNET to the Administrators group but the error is still
there (I've killed the aspnet_wp.exe process and restarted IIS to be
sure the change was taken into account).

I've noticed I can start (from VS) the project in debug mode with
"aspnet debugging" disabled and "native debugging" enabled but the
breakpoint in my native code is never reached; is that a feature?

I've noticed that the system contains two debugger groups: "Debugger
users" and "Utenti debugger". The first one was probably created
during a failed (due to broken disks) attempt to install VS .NET
English version, when we first installed the machine a few months ago,
after which we successfully installed the italian one. I've assigned
the local developer and the aspnet user to both groups (further to
Administrators) but it didn't help.

Is there a way to run VS in "verbose" mode to catch the exact
operation which is causing the "Access Denied" error?

I've also tried changing the process model in order to run
aspnet_wp.exe as SYSTEM, but it didn't help either.

Given that ASPNET debugging seems to be working fine, is there
anything special I should check for the native code file permissions?
(everyone has full control on the DLL file anyway).

I've noticed that the application event log contains the following
entries (but at times which seem unrelated to the errors I see):

"Unable to journal object
'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\aboutoptions\9433fef3\daeb307\assembly\tmp\PMNCL6Z8\__AssemblyInfo__.ini':
Access Error 32."

Cheers...

-- Marco --

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