When you try to debug on an application running on a Web server, you may
sometimes get a message with this error message:
Unable to start debugging on the Web server
If you encounter these errors, there are several things to consider:
Things to
Check
If you get an "Unable to start debugging on the Web server" error, try
checking the following things:
To
check IIS security settings for the Default Web Site
- From the Start menu, choose Programs, then
Administrative Tools, and click Internet Services Manager
(Windows 2000) or Internet Information Services (Windows XP).
- In the Internet Services Manager or Internet Information
Services dialog box, click the tree control for your machine. In the
Web Sites folder, find Default Web Site.
- Right-click Default Web Site and choose Properties.
- In the Default Web Site Properties window, select the
Directory Security tab and click Edit.
- In the Authentication Methods dialog box, select
Anonymous Access and Integrated Windows Authentication (if not
already selected).
- Click OK to close the Internet Services Manager or
Internet Information Services dialog box.
- Click OK.
- For an ATL Server application, verify that the DEBUG verb is
associated with your ISAPI extension.
- For an ASP.NET application, make sure the virtual folder for the
application has an Application Name set in Internet Services
Manager or Internet Information Services.
To
designate the virtual folder for the Web application
- From the Start menu, choose Programs, then Administrative
Tools, and click Internet Services Manager (Windows 2000) or
Internet Information Services (Windows XP).
- In the Internet Services Manager or Internet Information
Services dialog box, click the tree control for your machine. In the
Web Sites folder, find the Web application.
- Right-click the Web application and choose Properties.
- In the Web application Properties window, select the
Directory tab.
- Under Application Settings, click Create.
The application name appears in the box.
- Click OK to close the Properties dialog box.
- Click OK to close the Internet Services Manager or
Internet Information Services dialog box.
Web Applications
on Remote Servers
If the Web application is on a remote server, check the following:
- Were the proper setup programs run to install ASP.NET or ATL Server and
remote debugger components on the server?
- Do you have the necessary access privileges to debug processes running
under the system account? You need to be a member of the Debugger Users
group or an administrator if the ASP.NET worker process runs under your own
user account. You need to be a member of the Administrators group if the
ASP.NET worker process runs under any other user account besides your own.
(See Adding
Debugger Users and Configuring DCOM for procedural information.)
ASP.NET applications run as ASPNET by default. To debug an application
running under aspnet_wp.exe, you need Administrator privileges or edit the
machine.config file for aspnet_wp.exe so that aspnet_wp.exe runs under your
user account. (On Windows Server 2003, the worker process is called w3wp.exe
rather than aspnet_wp.exe, and you can change the account it runs under
using IIS.) To debug an application running under inetinfo.exe, you need to
be Administrator on the machine running inetinfo.exe.
ATL Server applications run under inetinfo.exe or the ATL worker process
dllhost.exe, depending on security settings. To debug an application running
under inetinfo.exe, you must be an Administrator on the machine running
inetinfo.exe, or you can configure dllhost to run as a particular user using
the common language runtime application settings
- Are you using Terminal Server to try to debug a Web application on a
remote machine? Remote debugging of native Web applications using Terminal
Server is supported under Windows XP. It is not supported under Windows 2000
or Windows NT.
IIS on Windows Server
2003
When you install Visual Studio .NET on Windows Server 2003, ASP.NET is
not enabled by default. To develop Web projects, you must run the Security
Lockdown Wizard after completing Visual Studio .NET Setup.
If you run the Security Lockdown Wizard before Visual Studio .NET
setup is complete, the correct version of ASP.NET may not be enabled. Visual
Studio .NET Setup installs a new version of ASP.NET. To ensure that the
latest version of ASP.NET is enabled, you must run the Security Lockdown
Wizard after setup has finished.
To configure IIS after running setup on Windows Server
2003
- From the Start menu, choose All Programs.
- Choose Administrative Tools and then choose Internet
Information Services.
- Right-click your machine name in the left pane and choose
Security.
- On the first screen of the IIS Security Lockdown Wizard, click
Next.
- Verify that HTTP is set to Automatic and click Next.
- In the Request Handlers list, check ASP.NET and each instance of
n:\WINDOWS\Microsoft.NET\Framework\<version
number>\aspnet_isapi.dll.
- Click Next.
- Click Finish to complete the wizard
Web
Applications Stored in Visual SourceSafe and Using FrontPage Server
Extensions
If the Web application is stored in Visual SourceSafe and uses FrontPage
Server Extensions as its Web Access mode, check the following:
- Is Visual SourceSafe located on the same machine as the FrontPage
Server/Web server? If so, you can debug using Integrated Authentication. (To
check the Integrated Authentication setting, see the procedure To check IIS
security settings for the Default Web Site earlier.)
Manually
Attaching
If you follow the troubleshooting steps and still get an error message when
you start debugging, you may want to try debugging your application by
manually attaching.
To manually attach
- Start the application without debugging. (From the Debug menu,
choose Start Without Debugging.)
- Attach to the appropriate IIS process or worker process. By default,
inetinfo.exe for ATL Server applications or aspnet_wp.exe for ASP.NET applications (w3wp_wp.exe for ASP.NET applications under Windows Server
2003).
Use the following procedures to determine which process an ASP.NET or ATL
Server application runs under.
To check which process an ASP.NET application runs
under
- Use Visual Studio .NET or another text editor to open the
machine.config file for the application.
- Find this process model attribute:
enable
If enable is set to TRUE, the application
runs under aspnet_wp.exe or w3wp.exe. (This is also the default setting.)
If enable is set to FALSE, the application
runs under inetinfo.exe.
To check which process an ATL Server application runs
under
- In Solution Explorer, right-click the project name and choose
Properties from the shortcut menu.
- In the <Project> Property Pages dialog box, open the
Web Deployment folder and choose General.
- Look at the Application Protection setting.
If the setting is Low (IIS Process), the application runs under
inetinfo.exe.
If the setting is Medium (Pooled), the application runs under a
dllhost.exe process (in common with other pooled ATL Server applications).
In the setting is High (Isolated), the application runs under a
dllhost.exe process (separate from other ATL Server applications).
- Click OK to close the <Project> Property
Pages dialog box.
See Also
Debugging
Script and Web: Errors and Troubleshooting