473,322 Members | 1,421 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,322 software developers and data experts.

How to create a new session...

Hi guys. I have been trying to create a new session from the server droping
the exixting session using Session.Abandon but since the browser doesnt know
that the session was abandoned it keeps sending the old session number and
then the server uses the same old sesion number to start a new session. Is
there a way to seta new session number and send it back to the browser?
thanks,
alex.
Mar 27 '06 #1
3 4385
this should do the trick:

Session.Abandon();
Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", ""));

the full article: http://support.microsoft.com/?kbid=899918

alex.

"Alex D." <al********@hotmail.com> wrote in message
news:es**************@TK2MSFTNGP10.phx.gbl...
Hi guys. I have been trying to create a new session from the server
droping the exixting session using Session.Abandon but since the browser
doesnt know that the session was abandoned it keeps sending the old
session number and then the server uses the same old sesion number to
start a new session. Is there a way to seta new session number and send it
back to the browser?
thanks,
alex.

Mar 27 '06 #2
In a word, yes. Close the browser. in ASP.NET 2.0, a new Session object isn't
created until something is added to it. So, it's possible that's part of your
issue (although we don't know what your code is doing since you didn't post
any)

--Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Alex D." wrote:
Hi guys. I have been trying to create a new session from the server droping
the exixting session using Session.Abandon but since the browser doesnt know
that the session was abandoned it keeps sending the old session number and
then the server uses the same old sesion number to start a new session. Is
there a way to seta new session number and send it back to the browser?
thanks,
alex.

Mar 27 '06 #3
well what I have been trying to do is to launch multiple new browser windows
each with its own session from the same parent window... though it seems is
not possible, so I will have to change my whole concept cause I didnt count
with this issue. In the HTML specification there should be something like
target=_newsession. That would simplify everything.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:3C**********************************@microsof t.com...
In a word, yes. Close the browser. in ASP.NET 2.0, a new Session object
isn't
created until something is added to it. So, it's possible that's part of
your
issue (although we don't know what your code is doing since you didn't
post
any)

--Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Alex D." wrote:
Hi guys. I have been trying to create a new session from the server
droping
the exixting session using Session.Abandon but since the browser doesnt
know
that the session was abandoned it keeps sending the old session number
and
then the server uses the same old sesion number to start a new session.
Is
there a way to seta new session number and send it back to the browser?
thanks,
alex.

Mar 27 '06 #4

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

Similar topics

2
by: Nir | last post by:
Hello all. How can I create a new session manually by code . Thank's Nir
4
by: Christina N | last post by:
Can anyone give me a code example of how to use a global array to keep track of all active sessions (their sessionid, logontime, etc)? I need a code example, not a prosa description of what to...
0
by: antonyliu2002 | last post by:
I am not new to programming, but I am new to VB .NET. I have a multiselect listbox like this: Please select your favorite fruit: Apple Banana Coconut Date
2
by: Markus Prediger | last post by:
Hi NG, I have an asp.net project that uses an vb6 com object for some database-manipulation (I cannot rewrite it in .net, sorry, its not my decision). I want it to be instanciated seperately...
0
by: DotDidIt | last post by:
Hi Everybody! I developed a Web service with IBM RAD v 6.0.1. After creating the WSDL file i have tried to develop a .Net client. But by using wsdl.exe (1.1.4322) to create a .net c# proxy i...
1
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM...
1
by: =?Utf-8?B?YWxiZXJ0bHk=?= | last post by:
How can I create a new session from the existing session in asp.net when new IE session is opened using javascript's window.open method or user's hyperlink click? I have a web application which...
4
by: =?Utf-8?B?QmVubnk=?= | last post by:
How do I create a new IE window (client script or ASP.NET server code) so that it will create a new ASP session with each new window? Thanks.
2
by: readnlearn | last post by:
hii i hav a problem with thsi code check it once if (!this.IsPostBack) // Create a random code and store it in the Session object. this.Session = GenerateRandomCode(); else
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.