|
-
Dec 11th, 2003, 06:28 AM
#1
Thread Starter
Fanatic Member
losing session variables
Hi,
I'm suffering from a weird problem and i'm just wondering if anybody else has had it.
I am storing a number of variables as session objects. When i test my application locally, it works fine storing the information as it should do. When it is used by outside users however, the session objects lose their values. The problem occurs when my application opens a new browser window. I would have thought it could be this alone but the fact it works locally is puzzling.
Any body any idea?
many thanks
Nick
-
Jan 6th, 2004, 04:42 AM
#2
Here's a sample from the web.config file of one of my sites using session variables. Can you check you've got values in the highlighted parts below?
Code:
<authentication mode="Forms">
<forms name=".CookieNameHere" loginUrl="LoginPage.aspx" protection="All" timeout="30" path="/" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
<sessionState
mode="InProc"
stateConnectionString="tcpip=192.168.1.102:8080"
sqlConnectionString="data source=192.168.1.102;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
-
Apr 20th, 2004, 05:47 AM
#3
nswan did you ever sort this out?
I have a problem where my clients site requires a user to be authorised. The problem is that somehow from my clients machine they are losing session every couple of mins and so not being authorised are getting chucked back out to the log in screen.
It works fine from here (both accessing same server), Any idea's at all as to how one keeps session as it should, but one connecting from the other machine won't keep sessionstate?
Sorry thats not worded very well at all.
-
Apr 20th, 2004, 08:40 AM
#4
Frenzied Member
I made a work around for this before I even tried the sesion because I had the problem in old asp
I am writeing sessionID, user name, ip, and some other junk to an xml file. So far everything seems fine even when the session is dropped and the user comesback the sessionID is normal the same and if it isn't they loggin, I clean the old seesion based on user name and we bump on down the line. I would just use SQL Server session state but no my host won't let me
Magiaus
If I helped give me some points.
-
Apr 20th, 2004, 08:43 AM
#5
Frenzied Member
isn't it weird that the sessionID is the same if the seesion is dropped or is that supposed to happen? It may just be in test because my computers have a static ip's but still....
Magiaus
If I helped give me some points.
-
Apr 20th, 2004, 08:45 AM
#6
Thread Starter
Fanatic Member
i think my problem was to do with the following scenario:
A parent window opened another window(say for browsing for a file). This child window then redirected the parent window to another page before closing.
I think it was opening different windows might cause new sessions but am not sure.
Are you using Forms authentication when logging them on?
-
Apr 20th, 2004, 08:52 AM
#7
Yep using Formsauthentication but got to the bottom of my problem now and why it was so hard to spot.
We recently moved over to load-balanced servers. There was a problem with one of the 3 servers (the one the client was conneting too) whilst the one we connected to was working fine.
Took me ages to think that we might not be connecting to the same server!
-
Apr 20th, 2004, 08:59 AM
#8
Frenzied Member
I don't see how a new window could cause a new session. The same ip, computer name and so on are there and the window opens inside the original seesion. I know that the window can't cause it because start your site get a session and close the site. Now go back with a new window if everything works properly you have session data still. By default that data is good for 20 min and the session id is found by checking ip, computer name and some other junk. I think.
Magiaus
If I helped give me some points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|