Q:
How to determine whether the client cookies are disabled originally means that cookies are disabled, and then I use session to store data. However, sessionid is also stored in cookies. Therefore, when cookies are disabled, the session cannot be used.
Later, I found it online.
The session Status of the client in ASP. NET is stored in the session model introduction above. You can find that the session status should be stored in two places: the client and the 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 the cookie in the browser settings, then he will not be able to enjoy the convenience of the Session, and even lead to access to some websites. To solve the above problems, the session information storage methods of the client in ASP. NET are divided into cookie and cookieless.
I installed this method to store the session, but these things will appear in the address bar. Http: // localhost/mytestapplication/(ulqsek45heu3ic2a5zgdl245)/default. aspx looks pretty bad. I gave up this method.
Return 1:
I am responsible for telling you that if the client disables cookies, you can ignore them at all. In addition, any website uses cookies to package portals in China. If cookies are disabled, it makes no sense. Therefore, you can directly consider the cookie idea when making a website. Of course, you can make a decision to use session to store the customer information that disables cookies.
Back to 2:
You can also set cookieless to autodetecte in Web. config, so that the cookie-enabled client URL is normal, and the cookieless URL is used if cookieless is not enabled.
3:
no other options are available. You must be prompted to enable cookies. This is done in all major forums.