gdspeare
asked on
ASP Session ID
I am using a cookieless session id. My issue is that every page in my application is assigning a new session id when a page is new page is loaded.
I can't seem to figure out how to use the same active session for every page in the instance.
Thanks
I can't seem to figure out how to use the same active session for every page in the instance.
Thanks
ASKER
new pages are opened from the menu in the same tab.
and new session ids are being given.
and new session ids are being given.
Then I think that you are using absolute URLs or relative to application root.
I tried it this way: Created two pages Page1.aspx and Page2.aspx in same folder. On Page1.aspx, i added two links to page Page2.aspx as:
<a href="Page2.aspx">Link 1</a>
<a href="/Page2.aspx">Link 2</a>
If I click on Link 1, it uses the same session id. But if I click Link 2, it assigns a new session id.
I am not sure but it seems that this behavior is by design and probably we cannot change it.
Although its not exactly the solution to your problem, but it will help you understand a bit about cookiless sessions.
I tried it this way: Created two pages Page1.aspx and Page2.aspx in same folder. On Page1.aspx, i added two links to page Page2.aspx as:
<a href="Page2.aspx">Link 1</a>
<a href="/Page2.aspx">Link 2</a>
If I click on Link 1, it uses the same session id. But if I click Link 2, it assigns a new session id.
I am not sure but it seems that this behavior is by design and probably we cannot change it.
Although its not exactly the solution to your problem, but it will help you understand a bit about cookiless sessions.
Just found on an article that we can use absolute urls like this:
<a runat="server"
href=<% =Response.ApplyAppPathModi fier("/Pag e2.aspx")% > >Link 2</a>
Here is the link to that post:
http://msdn.microsoft.com/en-us/library/aa479314.aspx
<a runat="server"
href=<% =Response.ApplyAppPathModi
Here is the link to that post:
http://msdn.microsoft.com/en-us/library/aa479314.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you open different pages in same tab, then everything should work fine. But in different tabs, you may face problem.