Microsoft Knowledge Base Email Alertz

(894433) - Describes a problem that may occur in Visual Studio .NET. If you have administrative permissions, you may receive an Access is denied error message when you try to debug a Web application. ASP.NET is configured for non-administrative users.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 894433 - Last Review: May 18, 2007 - Revision: 3.5

You may receive an "Access is denied" error message when you try to debug a Web application in Visual Studio .NET, and you have administrative permissions

On This Page

SYMPTOMS

You may receive the following error message when you try to debug a Web application:
Access is Denied
The problem occurs when the following conditions are true:
  • You are logged on to your computer with administrative permissions.
  • You are debugging a Web application in Microsoft Visual Studio .NET.
  • The operating system that you are using is Microsoft Windows XP Service Pack 2.
  • The Microsoft ASP.NET worker process account is not a member of the Administrators group.

CAUSE

The problem occurs because the ASP.NET worker process does not have the Impersonate a client after authentication user right. If the worker process account does not have this right, the debugger cannot attach to the process. The worker process account is configured by using the processModel element in the Machine.config file.

RESOLUTION

To give the worker process account the Impersonate a client after authentication user right, follow these steps:
  1. Click Start, point to Settings, and then click Control Panel.
  2. Double-click Administrative Tools.
  3. Double-click Local Security Policy.
  4. Expand Security Setting, expand Local Policies, and then click User Rights Assignment.
  5. In the Policy pane, right-click Impersonate a client after authentication, and then click Properties.
  6. Click Add User or Group.
  7. Add the worker process account that is configured in the processModel element in the Machine.config file.
  8. Click OK two times.
  9. Click Start, click Run, type iisreset, and then click OK.
  10. At a command prompt, type the following command to refresh policies on the computer:
    gpupdate /force

MORE INFORMATION

Steps to reproduce the problem

  1. Open the Machine.config file. Locate the processModel element.
  2. Replace the username attribute and the password attribute as a non-administrative user.
  3. Restart Internet Information Services (IIS).
  4. Log off your computer. Log on your computer so that you have administrative permissions.
  5. Start Visual Studio .NET.
  6. Create a new Web application.

    When you try to debug the Web application, you may receive the following error message:
    Error while trying to run project: Unable to start debugging on the web server. Access is denied.

REFERENCES

For more information about developing software in Visual Studio .NET that has non-administrative permissions, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/aa289173(VS.71).aspx (http://msdn2.microsoft.com/en-us/library/aa289173(VS.71).aspx)

APPLIES TO
  • Microsoft Visual Studio .NET 2002 Academic Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Professional Edition
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
  • Microsoft Windows XP Service Pack 2
Keywords: 
kbvs2002sp1fix kbvs2002sp1sweep kberrmsg kbprb kbpermissions kbiis kbtshoot kbbug kbfix KB894433
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Anatoly Reported as Irrelevant  
Written: 3/29/2005 10:59 PM
We are aware of another reason for this "Unable to debug" behaivior: When IE have Security settings->User Authentication->Logon Promt for user name and password checked

Geoff Furlong Reported as Irrelevant  
Written: 8/19/2005 3:18 AM
After much searching, I came across this gem! Worked first time. Seems the problem is SP2 resetting the policy rights.

BarryL Report As Irrelevant  
Written: 8/21/2005 2:19 PM
Excellent, just Excellent! I have roamed the internet with no luck with this one, until I came here. For me, the process account that is configured in the processModel was the ASPNET account (which is the default). After resetting and restarting the IIS, I entered joyfully the world of ASP.NET debug.

Rajeev Report As Irrelevant  
Written: 11/16/2005 9:36 PM
It was really helpful. I could help my friend who was facing this problem