Knowledge Base

How to debug a Visual Basic DLL under Active Server Pages

Article ID: 177182

Article Last Modified on 10/17/2005


APPLIES TO


This article was previously published under Q177182
We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 6.0 running on Microsoft Windows Server 2003. IIS 6.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:

SUMMARY

This article describes how to debug a Visual Basic ActiveX DLL that is running under Active Server Pages and Microsoft Internet Information Server (IIS).

MORE INFORMATION

To debug a Visual Basic component that is running under Active Server Pages and IIS, you must use a debugger that uses the CodeView style of debug information. The steps in this article use Microsoft Developer Studio. Developer Studio is the application used to develop Visual C++ and Visual J++ applications.
  1. In the project options for your Visual Basic DLL, select Create Symbolic Debug Info. This option generates symbolic debug information in an executable file or in a .dll file. You should also select no optimization.
  2. Run IIS (INetInfo.exe) under the debugger. Doing this is covered in Tech Note 063, which is part of the C++ documentation. To locate this article, search in Developer Studio or Microsoft Developer Network by using the key words "TN063: Debugging Internet Extension DLLs." For more information, see the "References" section.

    Here is a summary of the steps that are required:
    1. Make sure your user account has the required user rights to run inetinfo. See Tech Note 063 - Debugging Tips for a detailed explanation.
    2. Select Open Workspace, and then open INetInfo.exe.
    3. Under the debug settings for the workspace, enter -e W3Svc as a program argument.
    4. Under additional DLLs, select your Visual Basic DLL.
  3. In a test DLL, export the GetInfo method. This method is in the InfoObj.cls file. To debug the GetInfo method, load the InfoObj.cls file into Developer Studio, and then set a breakpoint in the method. Browse a page that loads the DLL and calls the method. Developer Studio will stop at the breakpoint in this function.

REFERENCES

For the latest Knowledge Base articles and other support information about Microsoft Visual InterDev and Active Server Pages, visit the following Microsoft Developer Network (MSDN) Web site:

Keywords: kbbug kbdebug kbhowto kbwebserver KB177182