December 12, 2006

800a01ad error while debugging VB6 DLL under IIS6.0 on Win2003SP1


The following issue was causing because of terminal server. This issue not causes if VB dll debugged on server itself.

There is one KB article on it but not that much helpful to get complete solution:
http://support.microsoft.com/kb/298926

Configuration: Windows Server 2003 SP1, IIS6.0

A VB6.0 DLL works fine when called from ASP page without debug mode. However when I try to run it in debug mode using Visual Studio 6 IDE I am getting following error:

Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object

The test code is very simple and given at the end.

I tried the following to run the dll in debug mode and to invoke from the ASP page but nothing worked.
- Grant full control permissions at OS level to all users (‘Everyone’) for the folder where DLL resides.
- Created the “VB ASP Debug” entry in DCOMCNFG by modifying the registry and then giving proper permissions.
- Checked all permissions within the “Directory Security” tab within IIS
- Given read permission to everyone for DLL entries in registry.
- Added appropriate users in ‘Debugger Users’ (under Computer Management, System Tools, and Local Users and Groups)
- Used RegMon, FileMon and ProcessMon but not get much information.
- There are no event log entries in the application/System event log.
- In DCOMCNFG set proper permission for ‘Debug Machine Manger’ as well as test DLL.
- In IIS tried changing user authentication modes (under Directory Security)
- Given read permission to ‘Everyone’ to “C:\Program Files\Common Files”
- Given permission to ‘Everyone’ by opening Properties of DCOMCONFIG and then selecting COM Security.
- Given IIS_WPG, IUSR_ AND IWAM_ accounts both have Read/Execute NTFS rights on the following folders cascaded down.
\program files\common files\System
\Windows
\InetPub\WWWRoot

- Reinstalled SP1

Checked following KB sites:


http://support.microsoft.com/default.aspx/kb/194801
http://support.microsoft.com/kb/259725

VB Code:
(CompileTest.DebugME)

Public Function TestMe() As String
TestMe = "TestOK" ‘ put debug point here
End Function

Asp Code:
<%

set objTest = Server.CreateObject( "CompileTest.DebugME" )
Response.write(objTest.TestMe())
%>

<%

set objTest = Server.CreateObject( "CompileTest.DebugME" )
Response.write(objTest.TestMe())
%>