The Session status should be stored in two places: client and server.
The client is only responsible for saving the SessionID of the corresponding website, while other Session information is stored on the server.In ASP, the SessionID of the client is actually stored as a Cookie. If the user chooses to disable cookies in the browser settings, then the user will not be able to enjoy the convenience of the Session, or even access some websites. To solve the above problems, the Session information storage methods of the client in ASP. NET are divided into Cookie and Cookieless.
In ASP. NET, by default, Session information is stored on the client using cookies. If you want to use Cookieless on the client to store Session information, the method is as follows:
Find the root directory of the current Web application, open the Web. Config file, and find the following section:
Program code:
<SessionState
Mode = "InProc"
StateConnectionString = "tcpip = 127.0.0.1: 42424"
SqlConnectionString = "data source = 127.0.0.1; Trusted_Connection = yes"
Cookieless = "false"
Timeout = "20"
/>
In this section, cookieless = "false" is changed to cookieless = "true". In this way, the Session information of the client is no longer stored using cookies, but stored through URLs. Open a new IE and access the Web application. It will look like the following:
Http: // localhost: 1756/SessionTest/(S (kytfcd454nm2ub455ryc2h45 ))/Default. aspx
The Session ID of the client is highlighted in the blacklist.