Pass ASP Intrinsics to Com component by ref? 
Author Message
 Pass ASP Intrinsics to Com component by ref?

Hello,

A friend has run across an application that passes the four big ASP
intrinsic objects (request,response,session,application) to a VB com
component, e.g. He's looking for some advice from me.

Here is an example call from ASP to an example component.

dim myObj
set myObj=Server.CreateObject("Mylib.MyObj")
Response.write myObj.DoWork(Request,Application, Response, Server)

The only (modern) way I've ever done or seen this done is through the
ObjectContext to get references to the objects, which requests referencing
the MTS/COM+ typelib and being a configured component. That is, not passing
the intrinsics as parameters.

Now, this app does run totally in process (runs in IIS process space,
component is not in mts, it is just an ActiveX DLL.) So, it isn't doing
cross process calls, at least, not obviously so.

Nonetheless, this approach makes me very anxious for a reasons I can't put
my finger on. Am I being paranoid about this, or is there really some reason
why this is bad? Obviously, it would be very bad if these components were
ever being run in MTS...

Thanks for any thoughts,

Brian



Mon, 15 Sep 2003 22:59:06 GMT  
 Pass ASP Intrinsics to Com component by ref?
Microsoft recommends you use the ObjectContext way of getting the intrinsic
objects.  AFAIK it has never recommended you pass the objects as parameters,
before you could use ObjectContext you were supposed to use OnStartPage.  If
you search MS's site they may explain why you should use the ObjectContext
method.


Quote:
> Hello,

> A friend has run across an application that passes the four big ASP
> intrinsic objects (request,response,session,application) to a VB com
> component, e.g. He's looking for some advice from me.

> Here is an example call from ASP to an example component.

> dim myObj
> set myObj=Server.CreateObject("Mylib.MyObj")
> Response.write myObj.DoWork(Request,Application, Response, Server)

> The only (modern) way I've ever done or seen this done is through the
> ObjectContext to get references to the objects, which requests referencing
> the MTS/COM+ typelib and being a configured component. That is, not
passing
> the intrinsics as parameters.

> Now, this app does run totally in process (runs in IIS process space,
> component is not in mts, it is just an ActiveX DLL.) So, it isn't doing
> cross process calls, at least, not obviously so.

> Nonetheless, this approach makes me very anxious for a reasons I can't put
> my finger on. Am I being paranoid about this, or is there really some
reason
> why this is bad? Obviously, it would be very bad if these components were
> ever being run in MTS...

> Thanks for any thoughts,

> Brian



Mon, 15 Sep 2003 23:29:12 GMT  
 Pass ASP Intrinsics to Com component by ref?
Thanks, this is what my research discovered:

1. Prior to ObjectContext you use OnStartPage
2. Now all samples and advice indicates ObjectContext

searching Google, MSDN, usenet, everybody says use ObjectContext...but no
one says "DON'T pass this way even if you are inprocess..."

Still...


Quote:
> Microsoft recommends you use the ObjectContext way of getting the
intrinsic
> objects.  AFAIK it has never recommended you pass the objects as
parameters,
> before you could use ObjectContext you were supposed to use OnStartPage.
If
> you search MS's site they may explain why you should use the ObjectContext
> method.



> > Hello,

> > A friend has run across an application that passes the four big ASP
> > intrinsic objects (request,response,session,application) to a VB com
> > component, e.g. He's looking for some advice from me.

> > Here is an example call from ASP to an example component.

> > dim myObj
> > set myObj=Server.CreateObject("Mylib.MyObj")
> > Response.write myObj.DoWork(Request,Application, Response, Server)

> > The only (modern) way I've ever done or seen this done is through the
> > ObjectContext to get references to the objects, which requests
referencing
> > the MTS/COM+ typelib and being a configured component. That is, not
> passing
> > the intrinsics as parameters.

> > Now, this app does run totally in process (runs in IIS process space,
> > component is not in mts, it is just an ActiveX DLL.) So, it isn't doing
> > cross process calls, at least, not obviously so.

> > Nonetheless, this approach makes me very anxious for a reasons I can't
put
> > my finger on. Am I being paranoid about this, or is there really some
> reason
> > why this is bad? Obviously, it would be very bad if these components
were
> > ever being run in MTS...

> > Thanks for any thoughts,

> > Brian



Tue, 16 Sep 2003 01:47:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing Object Ref from asp page to com

2. Problem passing VB COM+ ASP Request object to .NET component System.Web.HTTPRequest through COM interop

3. Passing UDTs from ASP to COM Components

4. Passing error from Com component to ASP

5. Passing Variant Array from ASP to COM Component

6. Passing Variant Array from ASP to COM Component

7. Sending array to COM component by Ref

8. pass ref byte to com object

9. vbscript passing by ref to com object, problem

10. Problem with passing an ADODB.Recordset between com+ components

11. Problem with passing an ADODB.Recordset between com+ components

12. Passing by reference to an ATL COM component

 

 
Powered by phpBB® Forum Software