ASP.NET Testing if Cookies can be passed in URL [cookieless=true]
in the webconfig I set:
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="true"
timeout="20"
/>
and then in the browser address bar I get this:
http://localhost/CharmpixV2/(wexkf1y...qz)/test1.aspx
Why is this and whats how do I get rid of it. I thought that if
cookeiless=true then there would be no cookie, and when there is a cookie,
its hidden. I must really be missing something here...
Reply 1: If you do not use Cookies, ASP.NET will use URL to store session id. This is
correct. If you do not like ugly URL, you have to use Cookies.
be just what you want?
For sessions to work you need some sort of session-identifier, either
by cookie or by url.
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="true"
timeout="20"
/>
and then in the browser address bar I get this:
http://localhost/CharmpixV2/(wexkf1y...qz)/test1.aspx
Why is this and whats how do I get rid of it. I thought that if
cookeiless=true then there would be no cookie, and when there is a cookie,
its hidden. I must really be missing something here...
Reply 1: If you do not use Cookies, ASP.NET will use URL to store session id. This is
correct. If you do not like ugly URL, you have to use Cookies.
Reply 2: if you specify 'mode="off" ', then you will be rid of both cookies and
the ugly url. Of course, you won't have any sessions then, but this mightbe just what you want?
For sessions to work you need some sort of session-identifier, either
by cookie or by url.
Source: http://www.velocityreviews.com/forums/t76772-getting-cookie-in-url-when-cookieless-true.html
------------------
According to this it is supported: http://msdn.microsoft.com/en-us/library/aa479314.aspx
cookieless="true" />
The downside is that the session ID is placed in every URL used by the application:
http://yourserver/folder/(session ID here)/default.aspx
See this SO answer for additional details: Absolute URL Cookieless
Here they say to try also with
Other useful links: