|
 |
asp_components thread: Request object in COM object gives problems
Message #1 by inhumanoid@y... on Tue, 12 Feb 2002 10:44:59
|
|
This is the function (in a vb activex dll):
'Get absolutePath of System
Public Function testRequest() As String
Dim strPathTranslated, strApplicationPath As String
Dim objContext As ObjectContext
Dim objRequest As Request
Set objContext = GetObjectContext()
Set objRequest = objContext("Request")
strPathTranslated = objRequest.ServerVariables("PATH_TRANSLATED")
Set objRequest = Nothing
Set objContext = Nothing
testRequest = strApplicationPath
End Function
I get the following error:
Object variable or With block variable not set (Error 91)
Line: Set objRequest = objContext("Request")
I have included COM+ Services Type Library and Microsoft Acrive Server
Pages Object Library
I call it in asp like so:
Dim objTest
Set objTest = Server.CreateObject("LIB.TestFunc")
Response.Write objTest.testRequest()
Set objTest = Nothing
CreateObject goes just fine...
Any ideas ?
Message #2 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Tue, 12 Feb 2002 09:13:26 -0500
|
|
Did you place your COM object under any application in COM+ or MTS ?
Oleg
-----Original Message-----
From: inhumanoid@y... [mailto:inhumanoid@y...]
Sent: February 12, 2002 5:45 AM
To: ASP components
Subject: [asp_components] Request object in COM object gives problems
This is the function (in a vb activex dll):
'Get absolutePath of System
Public Function testRequest() As String
Dim strPathTranslated, strApplicationPath As String
Dim objContext As ObjectContext
Dim objRequest As Request
Set objContext = GetObjectContext()
Set objRequest = objContext("Request")
strPathTranslated = objRequest.ServerVariables("PATH_TRANSLATED")
Set objRequest = Nothing
Set objContext = Nothing
testRequest = strApplicationPath
End Function
I get the following error:
Object variable or With block variable not set (Error 91)
Line: Set objRequest = objContext("Request")
I have included COM+ Services Type Library and Microsoft Acrive Server
Pages Object Library
I call it in asp like so:
Dim objTest
Set objTest = Server.CreateObject("LIB.TestFunc")
Response.Write objTest.testRequest()
Set objTest = Nothing
CreateObject goes just fine...
Any ideas ?
c-oleg.kapeljushnik@w...
$subst('Email.Unsub')
$subst('Email.Unsub').
Message #3 by inhumanoid@y... on Tue, 12 Feb 2002 15:49:36
|
|
That seems to help. Is there anyway to automate COM+ registration ?
> Did you place your COM object under any application in COM+ or MTS ?
>
> Oleg
>
> -----Original Message-----
> From: inhumanoid@y... [mailto:inhumanoid@y...]
> Sent: February 12, 2002 5:45 AM
> To: ASP components
> Subject: [asp_components] Request object in COM object gives problems
>
>
> This is the function (in a vb activex dll):
>
> 'Get absolutePath of System
> Public Function testRequest() As String
> Dim strPathTranslated, strApplicationPath As String
> Dim objContext As ObjectContext
> Dim objRequest As Request
>
> Set objContext = GetObjectContext()
> Set objRequest = objContext("Request")
> strPathTranslated = objRequest.ServerVariables("PATH_TRANSLATED")
> Set objRequest = Nothing
> Set objContext = Nothing
>
> testRequest = strApplicationPath
> End Function
>
>
> I get the following error:
> Object variable or With block variable not set (Error 91)
> Line: Set objRequest = objContext("Request")
>
> I have included COM+ Services Type Library and Microsoft Acrive Server
> Pages Object Library
>
> I call it in asp like so:
> Dim objTest
> Set objTest = Server.CreateObject("LIB.TestFunc")
> Response.Write objTest.testRequest()
> Set objTest = Nothing
>
> CreateObject goes just fine...
>
> Any ideas ?
>
> c-oleg.kapeljushnik@w...
> $subst('Email.Unsub')
>
> $subst('Email.Unsub').
>
Message #4 by Oleg Kapeljushnik <c-oleg.kapeljushnik@w...> on Tue, 12 Feb 2002 11:17:14 -0500
|
|
Hmm...
unfortunately not..I didn't find any..:(
but you don't need to register it every time you compile.
Just stop COM+ application and it will release your DLL.
Oleg.
-----Original Message-----
From: inhumanoid@y... [mailto:inhumanoid@y...]
Sent: February 12, 2002 10:50 AM
To: ASP components
Subject: [asp_components] RE: Request object in COM object gives
problems
That seems to help. Is there anyway to automate COM+ registration ?
> Did you place your COM object under any application in COM+ or MTS ?
>
> Oleg
>
> -----Original Message-----
> From: inhumanoid@y... [mailto:inhumanoid@y...]
> Sent: February 12, 2002 5:45 AM
> To: ASP components
> Subject: [asp_components] Request object in COM object gives problems
>
>
> This is the function (in a vb activex dll):
>
> 'Get absolutePath of System
> Public Function testRequest() As String
> Dim strPathTranslated, strApplicationPath As String
> Dim objContext As ObjectContext
> Dim objRequest As Request
>
> Set objContext = GetObjectContext()
> Set objRequest = objContext("Request")
> strPathTranslated = objRequest.ServerVariables("PATH_TRANSLATED")
> Set objRequest = Nothing
> Set objContext = Nothing
>
> testRequest = strApplicationPath
> End Function
>
>
> I get the following error:
> Object variable or With block variable not set (Error 91)
> Line: Set objRequest = objContext("Request")
>
> I have included COM+ Services Type Library and Microsoft Acrive Server
> Pages Object Library
>
> I call it in asp like so:
> Dim objTest
> Set objTest = Server.CreateObject("LIB.TestFunc")
> Response.Write objTest.testRequest()
> Set objTest = Nothing
>
> CreateObject goes just fine...
>
> Any ideas ?
>
> c-oleg.kapeljushnik@w...
> $subst('Email.Unsub')
>
> $subst('Email.Unsub').
>
c-oleg.kapeljushnik@w...
$subst('Email.Unsub')
$subst('Email.Unsub').
|
|
 |