Microsoft KB Archive/177182

= How to debug a Visual Basic DLL under Active Server Pages =

Article ID: 177182

Article Last Modified on 10/17/2005

-

APPLIES TO


 * Microsoft Internet Information Server 4.0
 * Microsoft Internet Information Services 5.0

-



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:

http://www.microsoft.com/technet/security/prodtech/IIS.mspx



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.  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. 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:  Make sure your user account has the required user rights to run inetinfo. See Tech Note 063 - Debugging Tips for a detailed explanation. Select Open Workspace, and then open INetInfo.exe. Under the debug settings for the workspace, enter -e W3Svc as a program argument. Under additional DLLs, select your Visual Basic DLL.</li></ol> </li> 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.</li></ol>

<div class="references_section">