Classic ASP Upgrade

Fran 1 Reputation point
2022-02-10T17:45:34.693+00:00

I have Windows Server 2022 with Clasicc ASP installed.

There is a new standar of cookies. New attribute : SameSite

response.cookies(name)=value
response.cookies(name).domain =
response.cookies(name).secure=
response.cookies(name).path=
response.cookies(name).expire=

But how can I use response.cookies(name).samesite
The new standar born in 2020 and Micosoft not upgrade ASP Library or ASP DLL

How can I ask this or get and alternative. Using Response.AddHeader "Set-Cookie" is not a solution , because cannot read cookie in real time if not realod page.

Internet Information Services
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 54,626 Reputation points
    2022-02-10T21:15:22.847+00:00

    you have a couple options:

    • replace the asp cookie code with your own and use the cookie header directly.
    • use a httpmodule that modifies the response stream. it would modify the cookie header before returning to the html.
    • use IIS rewrite module to rewrite the cookie header:

    https://im5tu.io/article/2017/06/ensuring-samesite-cookies-with-url-rewrite/

    0 comments No comments

  2. nagaozen 1 Reputation point
    2022-05-27T14:01:19.157+00:00

    For Active Server Pages (ASP), the very best way to use modern cookies is by falling back to Cookie Specs and leveraging HTTP protocol like in this helper library: base.asp

    Good luck

    0 comments No comments