Results 1 to 2 of 2

Thread: Session tracked via URL in ASP.NET

  1. #1
    kenton311
    Guest

    Question Session tracked via URL in ASP.NET

    Hello,

    I have my asp.net web application to track session id across pages using the url, and not cookies, ie in the web.config file:
    <sessionState ..... cookieless="true" ........ />

    however each link in the page does not embed the id in the url like it is supposed to :

    <a href="http://mywebserver/(rqe4ptb333ojxz3kh1t3xqr3)/mypage.aspx"> my link </a>

    and so each page i travel to, a new session id is created in the url and the information associated with the previous page's session id is lost.

    can anybody tell me what else i need to do to make this work?

    thank you,

    Kenton Taylor

  2. #2
    kenton311
    Guest

    Angry Figured this out for those who care

    for some reason the .net framework will not insert the session id before rendering the HTML if your HREF uses a "/" to denote that the path is relative to the root

    this will work:
    href="http://myserver/home.aspx"

    as will this:
    href="home.aspx"

    but this won't:
    href="/home.aspx"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width