473,847 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4412
this should do the trick:

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

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

alex.

"Alex D." <al********@hot mail.com> wrote in message
news:es******** ******@TK2MSFTN GP10.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=_newsess ion. That would simplify everything.
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:3C******** *************** ***********@mic rosoft.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
1262
by: Nir | last post by:
Hello all. How can I create a new session manually by code . Thank's Nir
4
1696
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 do.. Anyone..? Best regards, Christina
0
1445
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
2137
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 for each session, so that three users can connect to three different databases. But I get crazy because: -With interop all users share one instance - pure chaos (the instance is
0
1803
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 get the following error message: Schema parsing error Namespace 'http://session.ejbs.cac.commerce.com' is not available to be referenced in this schema. Schema parsing error Namespace 'http://session.ejbs.cac.commerce.com'
1
2357
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 to 5 AM and 6 PM to 7 PM server2: down betn 7 AM to 7:30 AM server3: down betn 3 AM to 5 AM and 2 Pm to 3 PM
1
5352
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 needs two different sessions. When user clicks on a link in the existing session, application pops up new window and the new session should start from here onwards for this instance of IE. I need the old session to continue in the parent IE...
4
2039
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
1328
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
9879
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9727
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10705
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10330
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9477
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7879
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7050
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5907
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.