I want to handle sessionid on asp.net with client javascript

Asked 1 years ago, Updated 1 years ago, 86 views

In web.config,

<system.web>
    <httpCookies httpOnlyCookies="false"/>
</system.web>


even if configured as ASP.NET_SessionId is not visible from javascript.
How can I see it?

By the way, on the contrary
httpOnlyCookies="true"
Then you will not be able to see the other cookies.

javascript asp.net cookie sessionid

2022-09-30 11:08

1 Answers

Session cookies appear to be HttpOnly cookies regardless of what you specify in web.config
Per Page_Load,

Response.Cookies("ASP.NET_SessionId") .HttpOnly=False

I have confirmed that it will be a regular cookie by doing it as
I don't know what will happen if I manipulate this cookie on the client side, but


2022-09-30 11:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.