Background:
- I’m developing an ASP.NET application for a classic ASP website
- User authentication is performed by the classic ASP website
- The classic ASP website stores data in session variables to identify authenticated users
- I need to read the data in those session variables in my ASP.NET application
Many articles say that you need to store session state in a database in order to do this.
None of them have mentioned about using VBScript objects from within the VB.NET code.
Is it possible to do this? Can I not simply reference a COM library in my application and use the objects and their methods? If not, how come?
Session variable values are not just the result of a function call. They depend on IIS and other tools to uniquely identify the user. It isn’t possible to directly retrieve session state across these two frameworks.
Of course, depending on how sensitive the data is,you could hack it. Make an Ajax call in the background to retrieve session data from a custom page and feed it into the .NET session. It’s a hack and a security risk, but it would work.