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...