views:

137

answers:

1

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.

Is it to do something with cookie in web.config, but where? And what would be the implications if I remove that. How to remove?

+1  A: 

Session State and Forms Authentication can both be set up in the web.config file to operate without cookies - this is called "cookieless configuration". When this happens, ASP.Net can be set to try to compensate for lack of cookies by using the query string as a cookie substitute. This is what is causing your unwanted querystring parameters.

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

Changing the setting to "cookieless = UseCookies" will ensure that the cookieless feature will not be used, and hence it won't be appending the AspxAutoDetectCookieSupport to your URL.

The implications of this is that users who browse with cookies turned off will not be able to have Session data or use Forms Authentication. This may or may not affect your target audience, you'll have to judge that for yourself.

Edit: Here's the MSDN link for the cookieless feature: http://msdn.microsoft.com/en-us/library/aa479315.aspx

womp
thanks genius womp
lols