Microsoft KB Archive/258929

From BetaArchive Wiki

Article ID: 258929

Article Last Modified on 10/6/2004



APPLIES TO

  • Microsoft Visual InterDev 6.0 Standard Edition, when used with:
    • Microsoft Windows 2000 Standard Edition



This article was previously published under Q258929

SUMMARY

In some cases, users want to manually enable Visual InterDev debugging for their Active Server Pages (ASP) Web applications. In the following scenarios, manual debugging is the only option:

  • Debug an ASP Web application that is running on a port other than 80.
  • Debug an ASP Web application that resides on a FAT file system.
  • Debug an ASP Web application that resides on a virtual server that is using host header names.
  • Your development computer is not on the same domain as the Web server, or you are not using a domain-authenticated account.
  • Debug remotely from a Windows NT 4.0 client to a Windows 2000 Web server.

Note If you manually debug remotely from a Windows 2000 client to a Windows NT 4.0 Web server, see the following Microsoft Knowledge Base article:

196378 How To Debug ASP applications manually against Windows NT 4.0 Web Server


If you manually debug ASP applications, you can improve productivity because you do not rely on Visual InterDev to automatically set the server into the correct debugging state. Visual InterDev performs the following steps when setting up the server:

  1. Enables the debugging options of the Web application.
  2. Sets the Application Protection setting of the Web application to High (Isolated).
  3. Creates a Microsoft COM+ application package and attaches to the Dllhost.exe process.
  4. Sets the identity of the package to the user who you specified when you started your first debugging session.
  5. Launches Internet Explorer and attaches to the Iexplore.exe process.
  6. Stops the debugger, and then restores the server settings back to their original state.

Use the following method to manually enable debugging.

Note When you manually attach to processes, you can either attach to the Inetinfo.exe or the Dllhost.exe process. If you debug remotely or have set the Application Protection setting of your Web application to High or Medium, attach to the Dllhost.exe process. If you want to debug locally and have set your Web application to Low, attach to the Inetinfo.exe process.

MORE INFORMATION

Configure the Web application to attach to the Inetinfo.exe process

Note Use this method if you are going to attach to the Inetinfo.exe process (local debugging with the Application Protection setting of the Web application to Low [IIS Process]).

  1. Open the Internet Service Manager.
  2. Right-click the Web application that you want to locally debug, and then click Properties.
  3. Click Configuration, and then click the App Debugging tab.
  4. Click to select both Enable ASP server-side script debugging and Enable ASP client-side script debugging, and then click Apply.

Configure the Web application to attach to the Dllhost.exe process

Note Use the next two methods if you want to attach to the Dllhost.exe process (remotely debug with the Application Protection setting of the Web application at High or Medium).

  1. Open the Internet Service Manager.
  2. Right-click the Web application that you want to remotely debug, and then click Properties.
  3. Click the Directory tab, and then set the Application Protection setting to either High (Isolated) or Medium (Pooled), and then click Apply.
  4. Click Configuration, and then click the App Debugging tab.
  5. Click to select both Enable ASP server-side script debugging and Enable ASP client-side script debugging, and then click Apply.

Configure COM+ to attach to the Dllhost.exe process

  1. Open the Component Services console.
  2. Expand Component Services, expand Computers, expand My Computer, expand COM+ Applications, and then click the COM+ application package for your Web application.

    Note If you have set the Application Protection setting to Medium, you will configure the following COM+ application package:

    IIS Out-Of-Process Pooled Applications

  3. Open the Properties dialog box for your Web application.
  4. On the Identity tab, click This user, and then enter the account information that you will use for remotely debugging.

Attach to a process in Visual InterDev

  1. View the page that you want to debug in the browser.
  2. Open Visual InterDev.
  3. On the Debug menu, click Processes.
  4. In the Processes section of the modal dialog box that appears, click the appropriate Machine, and then click Refresh. The list of available processes appears.
  5. If you have set the Application Protection setting of the Web application to High or Medium, attach to the Dllhost.exe process. Otherwise, attach to the Inetinfo.exe process.
  6. Select the appropriate process, and then click Attach. The selected process appears in the Debugged Processes dialog box.
  7. On the View menu, point to Debug Windows, and then click Running Documents.
  8. Open the document from the Running Documents window, and then set a breakpoint.
  9. Refresh the page in the browser.

Note When you stop the debugger, make sure to use the Detach All Processes menu option on the Debug menu or the Detach button in the Processes dialog box. If you use the Stop button or menu item, the debugger may not stop correctly.

Enable ASP debugging

To enable ASP debugging, change the following settings:

  1. In Microsoft Visual Studio .NET, follow these steps:
    1. In Solution Explorer, right-click the project, point to Properties, point to Configuration Properties, and then click Debugging.
    2. Set the Enable ASP Debugging and Enable ASP.NET Debugging properties to True.
  2. In the IIS Snap-in, follow these steps:
    1. Right-click Default Web Site, point to Properties, point to Home Directory, point to Configuration, and then click Debugging.
    2. Turn on Enable ASP server-side script debugging.
  3. In the Computer Management snap-in, follow these steps:
    1. Expand System Tools, expand Local Users and Groups, and then expand Groups.
    2. Right-click Debugger Users, and then click Properties.
    3. Click Add and add the IWAN_MACHINENAME account to it.

Debug in Visual Studio .NET

To debug in Visual Studio .NET, follow these steps:

  1. Right-click the .asp page that the application should start from, and then click Set as Start Page.
  2. Set a breakpoint in the .asp code anywhere in the project.
  3. On the Debug menu, click Start, or press F5 to build the project and then start debugging.


REFERENCES

For additional information about debugging, click the following article number to view the article in the Microsoft Knowledge Base:

244272 INFO: Visual InterDev 6.0 debugging resources


Keywords: kbbug kbdebug kbhowto kbserver KB258929