Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET VB.NET
how i can hide session id from url
 
i am using a link
 
when link is open url shows userid (session data)
 
now i want that it will not show session id in url
 
i will set cokkieless=true but still it show session id in url
Posted 20-Oct-10 20:00pm
sharmarun1.6K
Edited 20-Oct-10 20:17pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

In continuation to above answer,
 
If you have set cookieless to false in your web.config file and it is still showing the sessionid in url, it means the browser has cookies disabled. Check the browser setting and enable the browser to accept cookies.
 
There is no way to hide the sessionid if cookies are disabled for a browser.
 
Hope this clears your doubt.
  Permalink  
Comments
Monjurul Habib at 27-Apr-11 15:14pm
   
That would be my answer, too.This is the only reason I vote 5 :-)
Ankur\m/ at 28-Apr-11 0:09am
   
Thanks again!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

if cookieless set to true, that tells asp.net that it cant
save cookies on any of the user's pc, and so it stores the session id in the
url.
if you set it to false, the session id will be removed from the url and
placed inside a cookie on the users pc.
so set cookieless set to false , to hide session id from url
  Permalink  
Comments
sharmarun at 21-Oct-10 2:13am
   
thanx for ur reply i allready set cookieless=false in web config but still it show session id
Brij at 21-Oct-10 2:20am
   
Pls share your web.config setting for the same

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 27 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100