473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

forcing new session id without closing browser

Is it possible to force a new session id without the client closing the
browser? I'm using session id in my database and I need a new session id
when a client clicks a certain link. I know I could use my own id in the
database but I was wondering if the the above is possible.

I tried using Session.Abort() and Session.Clear() and used both of them
together and the session id still persists.

Thanks.
Dec 14 '05 #1
5 2671
Try Session.Abandon.

Don't know for Abort but Clear just clears the session variable...

--

"Andy G" <aj*****@iastate.edu> a écrit dans le message de
news:OE**************@TK2MSFTNGP14.phx.gbl...
Is it possible to force a new session id without the client closing the
browser? I'm using session id in my database and I need a new session id
when a client clicks a certain link. I know I could use my own id in the
database but I was wondering if the the above is possible.

I tried using Session.Abort() and Session.Clear() and used both of them
together and the session id still persists.

Thanks.

Dec 14 '05 #2
SURE session.Abandon will work just fine as its the best way to do it,
but you may also want to check somthing like this
Session.Timeout(0.0000000001) will make the user starts a new session
when he makes any interaction with the target page if you ever find it
helpful in your scenario !

session.LCID gets or sets locale identifer for the session, u may want
to check it out too

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Dec 14 '05 #3
Sorry I meant to say Abondon in my previous message.

Abondon will not force ASP.NET to create a new session ID. Abondon calls
the Session_End and then the Session_Start, so really it doesn't do much
different than Clear.

I'm going to try using the session.timeout(0.00000001), whatever Dave
suggested below.
"Patrice" <no****@nowhere.com> wrote in message
news:Oq**************@TK2MSFTNGP10.phx.gbl...
Try Session.Abandon.

Don't know for Abort but Clear just clears the session variable...

--

"Andy G" <aj*****@iastate.edu> a écrit dans le message de
news:OE**************@TK2MSFTNGP14.phx.gbl...
Is it possible to force a new session id without the client closing the
browser? I'm using session id in my database and I need a new session id
when a client clicks a certain link. I know I could use my own id in the
database but I was wondering if the the above is possible.

I tried using Session.Abort() and Session.Clear() and used both of them
together and the session id still persists.

Thanks.


Dec 14 '05 #4
please keep me updated, thnx

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Dec 14 '05 #5
Well I've found some weird stuff and I hope someone can shed some light on
this.

Using the below on the page load will force ASP.NET to get a new Session
variable. I tried to put this same code on a button click event and it
didn't work. I tried it checking the post back and then leaving it out,
didn't make a difference. So the question is, what can Page_Load do/have
access to that a button click event doesn't?

FORCE ASP.NET TO GET A NEW SESSION VARIABLE
If Not IsPostBack Then

Request.Cookies("ASP.NET_SessionId").Expires = Now

End If

Hope some of this helps you guys. Thanks for the help too.

-Andy

"Dave Johnson" <es*********@gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
please keep me updated, thnx

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com

Dec 14 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on...
14
by: Darrin J Olson | last post by:
I am trying to end a session for a site without having to completely close the browser to end it. When I access the site and log in it works fine. If I log out and in with a different account...
2
by: Amit D.Shinde | last post by:
Hello Experts.. I need some help regarding cookies and session objects and also global.asa file I am creating one cookie when a user logs in on my website. The cookie stores the login name of...
4
by: Al | last post by:
Is possible to terminate all session variable created without closing the browser I do not want users to click on BACK button on browser or paste the url link in the http:// and shows the record...
2
by: Nate Spillson | last post by:
I have an asp.net web application that uses session variables to store user information (username, security areas, configuration data). When the user logs into the system I store all of this...
2
by: Naina Mohamed | last post by:
I have abandon a session in my page and navigate to some other page thro' Redirect method, but i am getting old session id in the navigated page. How to get new session variable in navigated page
5
by: news.microsoft.com | last post by:
Hi everyone, I need some help (may be in the form of some sample code) for the subject question. I have an ASP.NET/C# application. I need to do quite a few tasks when the session ends. I...
2
by: RC | last post by:
hi, I now got a session ID. I want to try to resume a session by closing the current browser and open a new one. Then pass the session ID in URL query string on new browser to resume the...
8
by: Mantorok | last post by:
Hi I've just been told that closing your browser closes your session on the web-site you are viewing, is this true? If so, is this the browser that initiates the closure, or the server? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.