Microsoft KB Archive/244807

{|
 * width="100%"|

PRB: Object Required Error for ObjectContext Under Windows 2000 in Visual Basic IDE and Active Server Pages

 * }

Q244807

-

The information in this article applies to:


 * Active Server Pages
 * Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0

-

SYMPTOMS
When you debug a Visual Basic COM object with ObjectContext in Visual Basic version 6.0 under Windows 2000 and Active Server Pages (ASP), the following error messages may appear:

Server object, ASP 0178 (0x80070005)

The call to Server.CreateObject failed while checking permissions. Access is denied to this object.

/xxxx.asp, line 4

"-or-"

Run-time error '424':

Object required

This problem does not occur under Windows NT version 4.0 Service Pack 4.

CAUSE
This occurs because there are two changes under Windows 2000. When you debug under Visual Basic, the security context of the ASP must match the security context of the Visual Basic integrated development environment (IDE). A COM+ application must be created beforehand, and the DLL must have been compiled and registered with this COM+ application.

RESOLUTION
To resolve this problem, follow these steps:

Match the security context of the executing ASP with the Visual Basic IDE:


 * Change authentication on the virtual directory to BASIC only.
 * When prompted, log on as the Interactive User (which is the user who logged onto the computer and is running the Visual Basic IDE Desktop Application).

Register the component with COM+:

 Restart the Web server. From a command prompt, type: Compile/Build the Visual Basic DLL. Create a new COM+ application and add this component (dll).