getting a new session id and losing session variables

prb: I have two pages in my app - one on redirect and the other as a new window - that get a new session id from every other page in the app (they both get the same session id) and obviously the session state variables are lost and, therefore, the pages do not look like they should.  All pages are within the same domain and virtual directory.

 1. a redirect; session variables are lost; session id is different from the previous page; if you click the BACK button you return to the previous page and the session id is the same as before and the session variables are as they should be

2. a new window; session variables are lost; session id is different from the previous page - NOTE: it is the same session id as the page in item 1; the page that this was called from has the same session id as every other page (with the exception of the page mentioned in item 1)

 also of note: I have 3 servers running this same app (dev, test, production) - the app does not have the session id change occurring and does not lose session variables in my development environment (this is not localhost) - this only happens in my test/prod environments

 thanks!


John Fowler
.Net applications developer
0
jfowler
10/3/2006 8:51:32 PM
asp.net.state-management 8807 articles. 0 followers. Follow

0 Replies
1104 Views

Similar Articles

[PageSpeed] 18

Reply:

Similar Artilces:

Losing session or IIS creating a new session ID
Hi If anyone can solve our problem. We had been wondering around for quite a while but could not find the actual problem neither its solution  On our website while dragging through the links on Master page we randomly lose session and a new session ID gets generated in between losing the track of old session ID. This problem started  occuring only when we migrated from ASP 1.x to ASP 2. We have tried working on Timeout Error and Application Pooling but it is neither of that. We suspect IIS to create a new session but we are not very sure and do not know how to solve th...

Getting Session ID and Session ID CHanging
I am building a cart, and when the user first accesses the site, I want to grab their SessionID. For some reason, I cannot get that Session ID when the site first pops up. I have a Session_Start() and Application_Start() function in the global.asax file. My other question is that everytime a page is loaded, a different session ID is grabbed and I am not sure why that would happen. Shouldn;t the Session ID always be the same while the user is on the site or the session timesout? Thanks If you don't use/store something in Session state during a user's Session, it will use a different ...

Can't get a new Session Variable to pass into a method (used Session, TextField and QueryString)
Hi Everyone,  I have been battling with this for about 18 hours now and coudl use some help...  I have a form that inserts into a DB table and then calls a method that makes a query to another table to create a Dataset for insert into a third table. ( I haven't done the third table insert yet but first things first.) Step 1 works fine. Step two is the problem. When I call the method I pass in two variables to get  return it will only work if I call an OLD Session variable. The session vaiable i set in the onSelectedChange event won't pass into the parameters... I als...

Session variables vs. Session States
What is the difference and in what situations are they used. Thanks, Mattypee A session state (the state of your session) holds your session variables. If your session state expires (due to inactivity) then you lose your session variables...and any other info stored for that session. If you need to store USER specific information within a web app, then session variables are one(of several) ways to do it. MajorCatsMajorCats Is there any code that you could show that would give an example? Thanks, Mattypee example of what? reading and writing session variables? ...

Get Session object from session id
The Session property is the current user's session, but I want to be able to read another user's session object to get/set variables.  I got a session id, but I don't know how to obtain a session object from the id.  Does someone know if this can be done?   I dont think you can access another user session from the current session. However, you should use the Cache, static properties, or Application variables which are shared by all usersHC Haissam Abdul MalakMCAD.NET| Blog |  Sure, technically it would be possible to get at the actual session obj...

After a looong night managed to change Session mode from inProc to SQLServer but still can't get the session variables to be saved
Hi,  I ran my Shopping Cart project and somehow everything worked fine(while in inProc), session variables were saved fine. I made some changes to my project and since then keep getting null session variables, no matter what I do. It took me the whole night to figure out how to turn to SQLServer mode,  marked custom classes as 'Serializable' with [Serializable] before the class definition but everything's in vain. Getting the same damned 'nulls' instead of the saved objects. private void Page_Load(object sender, System.EventArgs e)         {...

Session passing variables Using Session ID
I am passing variables using session ID . When multiple people sign-on to the server, the session ID is passed corectly, but the name and user ID are for the person that signed in first. That is both people get the same information, when it should be customized for each. I am using IIS version 7. SendingHttpContext.Current.Session("Session_ID") = Session.SessionID HttpContext.Current.Session("StudentName") = FirstLastHttpContext.Current.Session("StudentNumber") = StudentNumber Response.Write(FirstLast) Response.Write(StudentNumber) Response.Redirect(&quo...

Accessing Session id / session variables from JAvascript
Hello, i need to make frames in my homepage visible or invisible based on the sessions. Can anybody tell me how to access the sessionid / session variables using javascript ?? Regards yama     Hi, why javascript? If frame element is decorated with ID and runat="server", you could set it from server (when it's also more secure since javascript can also be turned off) Anyway, you could just put <%=%> in middle of js script to output session variable value <script> var mySessionValue = '<%=Session("variable")%>'; </script>  Thanks,Teemu Keis...

Is there a way to set session a variable by session ID?
I have a .Net 2.0 web page that hosts a Java applet.  The applet will post information to a different .Net web page (that the applet hosts, kind of like a frame).  This second page is in the same application as the first page, so it can share session info.  However, since the second page is hosted by the java applet it does not have the same session as the parent page.  I can pass the sessionID from the parent page to the applet, and then pass the ID from the applet to the hosted page (via querystring), however, I cannot figure out a way to set a session variable ...

Session State Variables across multi sessions
I am having an issue where I save my DataTable into a Session Variable:   Session["dtDMFile"] = dtDMFile; Different users can use the web form that I created. Once the data is loaded,I send the DataTable to the session variable. My problem is that when I go to reload the data in the table, it is taking the data from the last user who stored the DataTable instead of from the particular user on their browser. For instance, User 1 (machine 1) loads data with field contents of: field1  field2  field3 User 2 (machine 2), then loads data with field contents of: f...

Why am I getting a new session ID?
I have a web farm consisting of n servers, www1.domain.com, www2.domain.com through wwwn.domain.com. In the browser I visited www1, and by clicking one of the links on the page I was redirected to www2, but now I have a new session ID, and could not recover whatevere I saved when I was on www1. I'm using sql server state, session worked fine across pages if I remain on the same server. I have all the web.config files synchronized on all the servers, including the machinekey section, I have all the servers' application path synched as well. Any ideas? I copied the following from egghea...

Getting a new session id
Hello all,I'm trying to find how I can create a new session with a new session id everytime I login -, but i've had no luck so far.I've tried abandoning the session, clearing the session variables , etc.. but I just keep having the same session id. For the moment i have some code like this behind a button to test it, but it doesn't get me a new session id:Session.Clear();Session.Abandon();Response.Redirect("Login.aspx",true);Only closing the browser and re-running my asp.net project will give me a new session id.Can anyone help me ? Thanks.   Try expiring the cookie per this thread ...

Losing Session variables/state?
I'm having regular issues with the ASP.NET 2.0 Sessions. The session variables work fine for the most part. I found, downloaded and installed a Session timeout control which is intended to resend the user to the login page when the session timeout is reached. This does work but I'm not sure how well. The control is installed on various Master Pages.  The problem is that from time to time I get an Object reference not set to an instance of an object error:if (DetailsView1.CurrentMode == DetailsViewMode.ReadOnly) { string session = Session["client_id"].ToString(); DetailsView1.F...

Good news for those of you who get "Unable to make the session state request to the session state server." error..
Dear all,Due to the known problem of session variables getting lost if using InProc-server during frequent changes in development, I had to choose between SQL and ASP.NET State server, so I opted for the second. Initially, all fine, but after using it for a few days, I started to get this error: Server Error in '/cv2' Application.Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same.  If the server is on a remote machine, please ensure that it accep...

Web resources about - getting a new session id and losing session variables - asp.net.state-management

Variable - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Westpac interest rate rise is one of many variable loan rate rises
WESTPAC is not alone in hitting its owner-occupier customers with a surprise interest rate rise, as dozens of other variable rate home loans ...

Airbnb upgrades variable pricing tool for hosts
Online home rental group Airbnb is rolling out an upgraded variable pricing tool that automatically raises or cuts room rates based on supply ...

Commonwealth Bank raises variable home loan rates
Home owners' mortgage costs are set to rise by hundreds of dollars a year, after the Commonwealth Bank became the latest bank to hike interest ...

CBA lifts variable home loan rates to offset costs associated with stricter capital requirements
The Commonwealth Bank to lift its home loan interest rates independently of the Reserve Bank to partially offset costs associated with stricter ...

Washington Square Signs Spielbergs, Choi Joins Variable and More
... films and an episode of the HBO comedy series "Girls," on which he plays the role of Ray Ploshansky. New York-based creative collective Variable ...

YouTube v10.32 Tweaks Some Interface Elements And Includes Hints About Virtual Reality Content And Variable ...
Forget Update Wednesday! Monday is the new big day. Not only were we treated to the latest M preview release and the official Marshmallow name, ...

"You have to ignore many variables to think women are paid less than men. California is happy to try." ...
Writes Sarah Ketterer in The Wall Street Journal in "The ‘Wage Gap’ Myth That Won’t Die" (which you can get to without subscribing if you Google ...

Cisco Debuts Open Pay Variable Pricing, Updates CCRE
Cisco Debuts Open Pay Variable Pricing, Updates CCRE Channel Partners Kris Snow, president of Cisco Capital, says the company's new Open Pay ...

Expert Reveals the Latest Variable Capacity Technology
Learn about gForce Ultra CRAC equipment, the latest variable capacity technology to lower energy usage and increase reliability.

Resources last updated: 12/4/2015 10:37:13 AM