Connecting Tech Pros Worldwide Help | Site Map

Getting cookie in url when - cookieless="true"

moondaddy
Guest
 
Posts: n/a
#1: Nov 18 '05
in the webconfig I set:
<sessionState
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....

Can someone set me straight?

--
moondaddy@nospam.com


Somchai U.
Guest
 
Posts: n/a
#2: Nov 18 '05

re: Getting cookie in url when - cookieless="true"


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.

Somchai

"moondaddy" <moondaddy@nospam.com> wrote in message
news:OcJeGOBLEHA.556@tk2msftngp13.phx.gbl...[color=blue]
> in the webconfig I set:
> <sessionState
> 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....
>
> Can someone set me straight?
>
> --
> moondaddy@nospam.com
>
>[/color]


Hans Kesting
Guest
 
Posts: n/a
#3: Nov 18 '05

re: Getting cookie in url when - cookieless="true"



"moondaddy" <moondaddy@nospam.com> wrote in message news:OcJeGOBLEHA.556@tk2msftngp13.phx.gbl...[color=blue]
> in the webconfig I set:
> <sessionState
> 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....
>
> Can someone set me straight?
>
> --
> moondaddy@nospam.com
>
>[/color]

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 might
be just what you want?

For sessions to work you need some sort of session-identifier, either
by cookie or by url.

Hans Kesting


Steven Cheng[MSFT]
Guest
 
Posts: n/a
#4: Nov 18 '05

re: Getting cookie in url when - cookieless="true"


Hi Moondaddy,

I agree with Hans and Somchai, since the each client's Serverside Session
are idenitfied by a SessionID, be default, it is stored via cookie. When we
disabled cookie(use cookieless session state). The ASP.NET will embed the
sessionid among the Url, that's why you see the unexpected value between
the url. It's necessary for maintain the sessionstate between requests.
Here are some further reference on ASP.NET's Session state:

#Underpinnings of the Session State Implementation in ASP.NET
http://msdn.microsoft.com/library/en...ionstate.asp?f
rame=true

#Controlling Session State
http://msdn.microsoft.com/library/en...llingsessionst
ate.asp?frame=true

Hope also helps. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx



Steven Cheng[MSFT]
Guest
 
Posts: n/a
#5: Nov 18 '05

re: Getting cookie in url when - cookieless="true"



Hi Moondaddy,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx


Closed Thread