469,579 Members | 1,157 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Force a new SessionId

Hi,

Is there a way, I can get a new sessionid without user closing the browser
window?

I have a webpage, which logs user input and sessionid. If the user does not
close the browser and if someone else uses the same browser window, I can not
differentiate between different user inputs, because the sessionid is same.

Is there a way, I can force a new sessionid, when a certain page is viewed?

Thanx
Nov 19 '05 #1
3 1898
You can call Session.Abandon, which will create a new session on the next
request.

"dotnettester" <do**********@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
Hi,

Is there a way, I can get a new sessionid without user closing the browser
window?

I have a webpage, which logs user input and sessionid. If the user does
not
close the browser and if someone else uses the same browser window, I can
not
differentiate between different user inputs, because the sessionid is
same.

Is there a way, I can force a new sessionid, when a certain page is
viewed?

Thanx

Nov 19 '05 #2
dotnettester wrote:
Hi,

Is there a way, I can get a new sessionid without user closing the browser
window?

I have a webpage, which logs user input and sessionid. If the user does not
close the browser and if someone else uses the same browser window, I can not
differentiate between different user inputs, because the sessionid is same.

Is there a way, I can force a new sessionid, when a certain page is viewed?

Thanx


You could try a Session.Abandon and then redirect to the page... not
sure but it might work

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #3
Well, abondoning the session changes
Session.IsNewSession but the sessionid remains same.

:(
"Curt_C [MVP]" wrote:
dotnettester wrote:
Hi,

Is there a way, I can get a new sessionid without user closing the browser
window?

I have a webpage, which logs user input and sessionid. If the user does not
close the browser and if someone else uses the same browser window, I can not
differentiate between different user inputs, because the sessionid is same.

Is there a way, I can force a new sessionid, when a certain page is viewed?

Thanx


You could try a Session.Abandon and then redirect to the page... not
sure but it might work

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Brad Simon | last post: by
4 posts views Thread by Andy Fish | last post: by
4 posts views Thread by Kenny | last post: by
2 posts views Thread by Hardin | last post: by
2 posts views Thread by ocean | last post: by
2 posts views Thread by XML newbie: Urgent pls help! | last post: by
reply views Thread by Mustafa Rabie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.