question

Fran-6883 avatar image
0 Votes"
Fran-6883 asked nagaozen edited

Classic ASP Upgrade

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.

windows-server-iis
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

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/




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

nagaozen avatar image
0 Votes"
nagaozen answered nagaozen edited

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.