Help and Support
 

powered byLive Search

PRB: ASP 800a005b Object Variable or With Block Variable Not Set

Article ID:243772
Last Review:November 17, 2003
Revision:3.0
This article was previously published under Q243772
On This Page

SYMPTOMS

When calling a Component Object Model (COM) component that uses the ObjectContext function from an Active Server Pages (ASP) page, the following error may occur:
ObjectCtxtProject error '800a005b'
Object variable or With block variable not set
xxx.asp, line xx

Back to the top

CAUSE

In order to obtain the ObjectContext function, the component needs to be running inside a Microsoft Transaction Server (MTS) package.

Back to the top

RESOLUTION

You must register your component within a MTS package. For additional information on how to do this, click the article number below to view the article in the Microsoft Knowledge Base:
223406 (http://support.microsoft.com/kb/223406/EN-US/) HOWTO: Create an Empty MTS Package to Add Components for ASP


You must use Server.CreateObject in the ASP code in Internet Information Server 4.0 (IIS4) to access the ASP intrinsics. In IIS5 you can either use Server.CreateObject or CreateObject.

Back to the top

MORE INFORMATION

Steps to Reproduce Behavior


1.Stop and start the Web server to unload all DLLs.For additional information on how to do this, click the article number below to view the article in the Microsoft Knowledge Base:
200260 (http://support.microsoft.com/kb/200260/EN-US/) PRB: Permission Denied Error When Attempting to Recompile an ASP DLL
2.Register your Visual Basic ActiveX component from a command prompt as follows:
regsvr32 yourdll.dll
3.Request the ASP page from a browser. This creates the object instance and calls at least one method on it.
4.The following error is returned:
ObjectCtxtProject error '800a005b'
Object variable or With block variable not set
xxx.asp, line xx
5.Stop and start the Web server to unload all DLLs.
6.Create a new MTS Package in the Internet Service Manager and add your component.
7.Request the ASP page from a browser. The behavior is as expected.

Back to the top

REFERENCES

For additional informations, click the article number below to view the article in the Microsoft Knowledge Base:
223406 (http://support.microsoft.com/kb/223406/EN-US/) HOWTO: Create an Empty MTS Package to Add Components for ASP
238274 (http://support.microsoft.com/kb/238274/EN-US/) HOWTO: Obtain ObjectContext with ObjectControl Inside VB COM DLL from ASP and MTS
200260 (http://support.microsoft.com/kb/200260/EN-US/) PRB: Permission Denied Error When Attempting to Recompile an ASP DLL

Back to the top


APPLIES TO
Microsoft Transaction Services 2.0
Microsoft Active Server Pages 4.0, when used with:
  Microsoft Internet Information Server 4.0

Back to the top

Keywords: 
kberrmsg kbaspobj kbprb KB243772

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.