New project, new challenge... How true. A coworker came to me with the following issue:
In an ASP3.0 web application we call a .NET component and we want to access the intrinsic ASP objects (for instance the Session object) from there. Now in a legacy VB COM component you would just reference mtsax.dll, declare a variable as ObjectContext and call GetObjectContext.
Private ObjectContext As MTxAS.ObjectContext Private Session As ASPTypeLibrary.Session
Set ObjectContext = GetObjectContext() Set Session = ObjectContext("Session")
After reading a lot about session integration between ASP.NET and ASP3.0 (which I was not looking for), the answer turned out to be extremely simple. Sometimes it is just a matter of looking at the right place. To quote Ohad Israeli, who pointed me in the right direction:
The answer is always thereâ€¦
the problem is that you just donâ€™t look at the right place
Dim objAppServer As COMSVCSLib.AppServer Dim objContext As COMSVCSLib.ObjectContext Dim objSession As ASPTypeLibrary.Session