PRB: "Unable to Start Debugging on the Web Server" Error Message While You Debug ASP.NET Applications (817034)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft ASP.NET (included with the .NET Framework 1.1)
SYMPTOMSYou create an ASP.NET Web application and then specify that
the authentication in Internet Information Services (IIS) is set to Basic authentication. When you try to start to debug the ASP.NET Web application project 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. You do not have permissions to debug the server. Verify
that you are a member of the Debugger Users group on the server. Would you
like to disable future attempts to debug ASP.NET pages for this
project?
CAUSEWhen you set authentication to Basic, the HTTP debug request
cannot establish the username and the password for the debugger.
Therefore, the request does not reach the ASP.NET source code to debug, and
then the auto-attach debugging of processes fails.
WORKAROUNDTo work around this problem, manually attach a debugger
process. You can debug an ASP.NET Web application even if you set the authentication to Basic. Follow these steps to attach an Aspnet_wp.exe process to debug
an ASP.NET Web application. Create an ASP.NET Web Application Project- In Microsoft Visual Studio .NET, use Microsoft Visual Basic .NET or Microsoft Visual C# .NET to create a new ASP.NET Web
application project. Name the project
DebugTest. By default, WebForm1.aspx is created.
- Right-click WebForm1.aspx, and then click View
Code.
- Change the Page_Load event as follows :
Visual C# .NET Code
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write("Hi");
}
Visual Basic .NET Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Response.Write("Hi")
End Sub - On the Build menu, click Build
Solution.
Set Authentication to Basic- Click Start, point to
Settings, and then click Control Panel.
- In Control Panel, double-click
Administrative Tools.
- Double-click Internet Information
Services.
- Expand Internet Information
Services, and then locate the DebugTest virtual
directory.
- Right-click DebugTest, and then click
Properties.
- Click the Directory Security tab. Under
Anonymous access and authentication control, click
Edit.
- In the Authentication Methods dialog box,
click to select the Basic authentication check box.
- Click to clear the Anonymous access check box.
Click to clear the Integrated Windows authentication
check box.
- Click OK.
Attach aspnet_wp process to Debug- Set a breakpoint on the code in the Page_Load event.
- On the Debug menu, click Start
Without Debugging.
Note You must use the Start Without Debugging option
to see the ASP.NET worker process start. - On the Debug menu, click
Processes.
- In the Processes dialog box, select
the Aspnet_wp.exe process under Available Processes, and then click
Attach.
- In the Attach to Process dialog box, click to
select the Native and the Common Language Runtime
check boxes.
- Click OK, and then click
Close.
Note When you click OK, Visual Studio .NET may take
2 to 5 minutes to attach the process. - Type the following URL in the browser:
- Type your User Name and Password in the dialog box, and then click OK.
- Verify that you hit the breakpoint as you expect.
STATUS This
behavior is by design.REFERENCESFor more information about how to debug ASP.NET, visit the
following Microsoft Developer Network Web site: Debugging ASP.NET Web Applications
http://msdn.microsoft.com/library/en-us/vsdebug/html/vxtskdebuggingaspwebapplication.asp For additional information, click the following article
numbers to view the articles in the Microsoft Knowledge Base: 306172
INFO: Common Errors When You Debug ASP.NET Applications in Visual Studio .NET
318041 HOW TO: Set Up and Use Remote Debugging in Microsoft Visual Studio .NET
306169 PRB: Visual Studio .NET Debugger Does Not Stop on Breakpoints When You Debug ASP.NET Pages
Modification Type: | Major | Last Reviewed: | 5/3/2003 |
---|
Keywords: | kbDebug kbAuthentication kberrmsg kbWebForms kbprb KB817034 kbAudDeveloper |
---|
|