0

I have manualy assigned a sessionid to url: http://www.mysite.com/(S(jdave010098uqfraiasdp9999))/place.aspx so that 'jdave010098uqfraiasdp9999' would be captured by a label to identify a click on the link and stored in DB. But most times the sessionid changes, when the link is clicked therefore resulting to a different sessionid in the resulting url. my web config is:

<sessionState cookieless="true" regenerateExpiredSessionId="false" timeout="30"/>

Any idea on how to assign a seld-generated ID to URL??

Thanks for your time.

user851971
  • 23
  • 1
  • 7

2 Answers2

0

Session ID should not change if your application stores anything in the session container. On the other hand, if you do not store anything in session, the session id is free to change upon consecutive requests.

Wiktor Zychla
  • 47,367
  • 6
  • 74
  • 106
  • Thanks Wictor, but i`d like to know how i can store these sessionIDs on a session cotainer as I only used thisline to capture it, after appending it to url: label1.text=session.sessionid.tostring() – user851971 Nov 23 '12 at 21:27
0

You can assign a sessionID like this

Session["UserId"] = something;
syed mohsin
  • 2,948
  • 2
  • 23
  • 47
  • Thanks syed, the url are embedded in links in an email body and the sessionid in the url distinguishes each person that clicks the links but some link still load with same sessionid while others change. Also i dont have the users registered just their emails, so I just want to track who clicked the link. – user851971 Nov 23 '12 at 21:54