Remove cookie support

My site has the following URL format: www.mysite.com/Display.aspx?ID=128

However, most users see the URL as

www.mysite.com/Display.aspx?ID=128&AspxAutoDetectCookieSupport=1

How can I avoid & AspxAutoDetectCookieSupport = 1 from appearing in the url.

This is something to do with the cookie in web.config, but where? And what would be the consequences if I removed it. How to delete?

+3
source share
1 answer

Session and Form Status Authentication can be configured in the web.config file to work without cookies - this is called a "cookieless configuration". When this happens, ASP.Net can be configured to attempt to compensate for the absence of cookies by using the query string as a replacement for the cookie. This is what causes the unwanted query parameters.

You should look in your web.config for "cookieless = AutoDetect" or "cookieless = UseUri".

Changing the setting to "cookieless = UseCookies" ensures that the cookieless function will not be used, and therefore, it will not add AspxAutoDetectCookieSupport to your URL.

The consequence of this is that users who view cookies are disconnected, they will not be able to have session data or use forms authentication. This may or may not affect your target audience, you will have to judge for yourself.

Change Here is the MSDN link for the cookieless function: http://msdn.microsoft.com/en-us/library/aa479315.aspx

+5
source

Source: https://habr.com/ru/post/1241736/


All Articles