
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