|
-
October 2nd, 2004, 11:31 AM
#1
com+ dll runtime error - what am I doing wrong?
Hi
Have an unspectacular asp script
Code:
set obj=Server.CreateObject("MyWeb_dll.clsUser")
obj.StartCom
set obj = nothing
and this in clsUser in the dll (ripped off from the internet)
Code:
Public Sub StartCom()
Dim objContext As ObjectContext
Dim objResponse As Response
Dim objRequest As Request
Dim objApplication As Application
Dim objSession As Session
Set objContext = GetObjectContext()
Set objApplication = objContext("Application") 'Obtain ASP Application object.
Set objSession = objContext("Session") 'Obtain ASP Session object.
Set objResponse = objContext("Response") ' Obtain ASP Response object.
Set objRequest = objContext("Request") ' Obtain ASP Request object.
'This code uses the Response object (objResponse);
'you can use other intrinsic objects in a similar fashion.
objResponse.Write "Hello World!"
End Sub
It errors when the code gets as far as setting objApplication. 91, object variable or with blobk variable not set. I've set references to MS ASP Object library and Com+ service type library. What am I not doing right? I am only debugging at the mo so haven't registered any compiled dll with the Component Services - is this where I could be going wrong? Could it be an IIS setting?
Help!
-
October 2nd, 2004, 11:42 AM
#2
Re: com+ dll runtime error - what am I doing wrong?
Sussed it - set MTSTransactionMode to something other than 0.
Cheers
-
March 7th, 2005, 12:46 AM
#3
Re: com+ dll runtime error - what am I doing wrong?
HI Guys
I am facing Similar problem . Setting class Transaction mode property to any other value does not solve the purpose. Pls help.
-
March 7th, 2005, 03:53 PM
#4
Re: com+ dll runtime error - what am I doing wrong?
Hi
What error are you getting and where? Same as I described above??
Cheers
-
March 7th, 2005, 08:51 PM
#5
Re: com+ dll runtime error - what am I doing wrong?
If all fails just pass the response, session, and application object to your dll, but remember to clean up all the references explicitly.
But I would try registering the component with COM+ services first before changing your DLL design.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|