How to get the authentication cookie name for the current session in classic ASP

Classic ASP creates cookies with a name like ASPSESSIONIDSSDSQQCR, where the suffix after "ASPSESSIONID" is different. If you work with the application browser for some time, it saves all previous cookies of the session (there may be 10 cookies or more), so there is no way to understand which cookie is for the current session

I know there is a way to get the current SessionID

Session.SessionID

but how can I get the cookie value?


I'm just trying to create an authentication solution for ASP.NET, which is just an addon for the Main Classic ASP application.
In this project, the main application creates an entry in the database with the current Classic ASP cookie, and after that, when the user tries to access the ASP.NET part, he simply accepts all cookies "ASPSESSIONIDSSD + XXXXX" and checks which one still valid looking for the initial record in the database. If a valid session is detected, it must initiate an ASP.NET session ....

+3
source share
1 answer

, cookie Classic ASP Session ID ASP.NET. Cookie Classic ASP session , . , , .NET .

, , - cookie ASP-. , , , GUID. cookie .

Response.Cookies("SessionKey") = GeneratedGuid

cookie SessionKey .NET .

+2

Source: https://habr.com/ru/post/1775902/


All Articles