Microsoft Knowledge Base Email Alertz

(306156) - When you debug an ASP.NET application in Visual Studio .NET, you may receive the following error message: Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged For ASP.NET...

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: 306156 - Last Review: January 17, 2004 - Revision: 3.4

PRB: "The Project Is Not Configured to Be Debugged" Error Message When You Debug ASP.NET Applications

This article was previously published under Q306156

SYMPTOMS

When you debug an ASP.NET application in Visual Studio .NET, you may receive the following error message:
Error while trying to run project: Unable to start debugging on the web server. The project is not configured to be debugged

For ASP.NET projects, verify that you have a valid project file called 'Web.config' for the URL specified and 'debug' is set to 'true' in that file.
For ATL Server projects, verify that the 'DEBUG' verb is associated with your ISAPI extension.
Would you like to disable future attempts to debug ASP.NET pages for this project?

CAUSE

This error can occur primarily because:
  • The ASP.NET Application does not have a Web.Config file.
  • The Execute Permissions property for the current project folder in Internet Services Manager is set to None.

RESOLUTION

To resolve this problem, use one of the following methods, depending on your circumstances:
  • If your project does not have a Web.config file, add a Web.config file to the directory that contains the ASP.NET application. If you are working in Visual Studio .NET, right-click the project in Project Explorer, click Add New Item, and then click Web Configuration File.
  • If your project already has a Web.config file, and if the debug attribute is set to true in the <compilation> section of the Web.config file, follow these steps to set the Execute Permissions property for the project folder:
    1. Start Internet Services Manager, and then click the project that you are trying to debug.
    2. Right-click the project, and then click Properties.
    3. Click the Directory tab.
    4. If None is selected in the Execute Permissions list, click Scripts only, and then click Apply.

APPLIES TO
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Professional Edition
  • Microsoft Visual Studio .NET 2003 Academic Edition
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Academic Edition
Keywords: 
kbconfig kbdebug kberrmsg kbprb kbweb KB306156
       

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

MeenakshiR Reported as Irrelevant  
Written: 9/29/2004 3:16 AM
I was also facing the same problem.... but i had just to reinstall my os, not to change the computer... and i also overcomed the problem by creating a new application asnd copying all the files from the previous folder to the new one anfd it worked. i was not able to understand the reason behind it, but "all is well that ends well". i am now able to debug and run my new project. Meenakshi

Irina Reported as Irrelevant  
Written: 12/20/2004 3:01 PM
In my case I had to move existing Web App project from one machine to another. After that I could not debug the project until I set the Application Name In the Directory tab of IIS.

Irina Reported as Irrelevant  
Written: 12/20/2004 3:07 PM
In my case I had to move existing Web App project from one machine to another. After that I could not debug the project until I set the Application Name In the Directory tab of my project's properties under IIS.

hsimpson - hobart.simpson NOSPAM-AT-NOSPAM cnet.navy.mil Report As Irrelevant  
Written: 1/19/2005 10:16 AM
I had moved the existing Web App project from an old 933MHz machine, Windows 2000 NT, to a new 2.4GHz machine, Windows XP. After that no projects would debug until I set the Application Name In the Directory tab of IIS. THANK YOU Irina! Had been looking everyplace and my machine was already set to all the suggestions. In other software we "re-create" projects to overcome similar problems, but I really wanted to "find the cause" of it before giving up and doing that. We understand that normally when a virtual directory is created it sets the name for you. Will continue to "test" other scenarios now.