Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename ASP.NET_SessionId

Tags:

asp.net

People also ask

What is ASP Net_SessionId?

Net_SessionId is a cookie which is used to identify the users session on the server. The session being an area on the server which can be used to store data in between http requests.

Why does session ID change every request?

When using cookie-based session state, ASP.NET does not allocate storage for session data until the Session object is used. As a result, a new session ID is generated for each page request until the session object is accessed.


Add to your web.config:-

<system.web>
    <sessionState cookieName="foo" />
</system.web>

You can set this in the <sessionState> configuration setting in your web.config file:

<system.web>
    <sessionState cookieName="myCookieName" />
</system.web>

See sessionState Element. look at the cookieName attribute, which will change it from the default of "ASP.NET_SessionId".


Yes. You can do it in your web.config file:

<sessionState cookieName="foo" />

I don't recall it correctly but I think you can rename it by changing the web.config file.

Seach for the sessionState element of the web.config.