Session Variables Not Being Abandoned When Browser Window Is Closed?
Jan 20, 2011
It seemed to keep the session cookies from staying on the client after the browser was closed. Another strange this is that I can close the IE and open FireFox and the session is in there too. HOW IS THAT? I am thinking it is how my environment is setup. I have the sessions set for InProc and using cookies in IIS. What is different in IIS7?
Update: I am using integrated mode for my app pool. I looked at an older site I created using .net 3.5 and iis6 running on Sever2003. I can log into the site and it creates the session variable for me. I then go to FireFox and open the same site. It requires me to log in (my application will take you to your prfile if a session exists). If I then close IE and reopen IE, then go back to my site, it requires me to log in again. What is happening with iis7 and my current application, is quite odd. The only difference in how my session is pulled is that I am getting the variable while casting the current handler to the Page object: (Page)HttpContext.Current.Handler
Update: well, I think i found where the issues is and it has to do with casting the HttpContext.Current.Handler to the current page object. I have a configuration file where I wanted to put a property so all other classes could reference a central point to grab the User session object I created. The HttpContext.Current.session was always null and someone had suggested casting the HttpContext.Current.Handler. I created a simple page that checks to see if a session varaible has been created and if not it creates it. Then I print out the value. When I close the browser, the session is GONE. So, that is working. The code I had origianlly in this message was really for the back button, So I guess it is not clear why that session pulled from the Hnadler is always available until I speicifcally clear it.
View 3 Replies
Similar Messages:
Feb 25, 2016
If Someone has logged in to website and directly closes the window without clicking signout button where i have written a code to clear all session.
So in this case how i clear a session when user closes window directly?
View 1 Replies
Aug 18, 2010
How does session expires when the browser is closed?
View 4 Replies
Dec 29, 2010
When the browser is closed (w/out clicking on log out) and user launches the site using a new session, it does not prompt user to login credential page, rather it takes the user back to the previous session.
View 1 Replies
May 7, 2015
How to kill the session when Browser closed/page closed.
View 1 Replies
Apr 6, 2014
I want to store Session Data after Close browser.
View 1 Replies
May 18, 2010
I'm creating a site. Below is my authentication tag and session tag in web.config
<authentication mode="Forms">
<forms protection="All" loginUrl="Pages/Log In/Login.aspx" name=".ASPXFORMSAUTH" cookieless="UseCookies" requireSSL="false"
defaultUrl="Pages/Common/Default.aspx" enableCrossAppRedirects="false" slidingExpiration="true" timeout="30"path="/">
</forms>
</authentication>
<sessionState mode="InProc" timeout="30" cookieless="false" cookieName=".ASPSession"/>
And I have a custom Membership Providor....
<membership defaultProvider="SqlMemberShipProvider" userIsOnlineTimeWindow="15" hashAlgorithmType="">
<providers>
<clear/>
<add
name="SqlMemberShipProvider"
type="RoalManagement.SqlMemberShipProvider"
connectionStringName="SqlServices"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
writeExceptionsToEventLog="true"
applicationName="OnlineOnTheWeb"
minRequiredPasswordLength="6"
passwordStrengthRegularExpression="^.*(?=.{6,50})(?=.*[a-z])(?=.*[A-Z])(?=.*[dW]).*$"
maxInvalidPasswordAttempts="3"
requiresUniqueEmail="true"
/>
</providers>
</membership>
Now in login page after firsttime login i set some session data... like
protected void Login_LoggedIn(object sender, EventArgs e)
{
//.....
Session["EMPLOYEELOGGEDIN"] = "Y";
//.....
}
Now say i close the browser... and next time when i open the site it takes me directly to the default page [Login_LoggedIn is not called accordingly]... because i'm already logged in for 30 mins acc. to configuration. but as my session id gets changed i can't access Session["EMPLOYEELOGGEDIN"] from any page in this time. It always returns null. But how do i get back the previous session for that person?
View 7 Replies
Mar 30, 2010
How to keep the session variables even after closing the browser?
Everytime I close the browser, I lose all the session variables.
Is there any way to keep them?
View 6 Replies
Nov 10, 2010
Session variables are on server side. I need to clear out the server side session variables on browser close on client side. I have used a WebService and ajax call but still i am not getting the session cleared.
View 3 Replies
Mar 30, 2010
Is there a good way to keep the session after a user clicked reload/refresh? My boss wants this functionality, and I don't really/really don't want to use a query string...
View 2 Replies
Apr 15, 2010
I need to open a second browser window or tab, but it must have a different session ID.
Opening the new browser window from an ASP.NET page is easy, but then it shares the same cookie and thus session ID with the original.
View 3 Replies
Sep 27, 2010
Im calling the new popup window from gridview like
[Code]....
In the AddTargetPopUP.aspx ,I have button Call "ADD".When i click the add button it'll insert datas into database.I want to reload the parent gridview after insert into the database and want to close the popup.
View 4 Replies
Jan 7, 2011
How do I abandon the session when the user closes the browser window instead of pressing the logout button in ASP.Net 3.5 application.
View 5 Replies
Apr 29, 2010
I have a page wich opens a popup window. I want to pass some variables, like some textbox.text and 2 dataTables from parent window to the popup window. And then I'll have to return some vars from popup window to parent window. So what is the best way to do this,
1) using Sessions("")
or
2)passing the variables as parameteres:
LinkButton1.Attributes.Add("onclick", "window.open('popup.aspx?field1=" & value1 & "&field2=" & value2 & ......
I don't know if it's appropiated passing 8 or 10 variables as the option2 because the user will see a very long url with all the variables, but maybe is more efficient than using Sessions.... Anyway, could somebody clear me up?
View 12 Replies
Aug 8, 2010
i am trying to collect 2 variables from one hyperlink, and use those variables in the page_load to set as session. but i don't know how to collect those 2 variables
such :
<a href="javascript:;" onclick="wsChangeColor('mainData', '#FF0000','#FFE4E1');return false;" title="Change color" id="red">1</a>
i would like to collect '#FF0000','#FFE4E1' or direct set '#FF0000','#FFE4E1' to string then send to pageload, how can i do this by only clicking on it ?
View 1 Replies
Oct 13, 2010
I have issue about multiple login in asp.net.
Case this happen:
User X login as "user1" in web browser.
Then user Y also login as "user1" also in another web browser.
User Y got error message "Another user log in some account".
That is work as expected.
If X, close their web browser. Then try again to login in as "user1".
X get also get "Another user log in some account".
So i trying debug then i found session is remove when web browser is close, but cache still remaining in web browser.
how to clear cache when user close their browser, (not tab).
View 1 Replies
Feb 21, 2011
how to refresh a parent page when child window is closed.
View 2 Replies
Jul 15, 2012
I am working on roles. Allocated some tasks to Annonumous User and LoggedIn User. What happen, once I login it shows me the correct task for LoggedIn user. But if I restart the application then by default it shows me LoggedIn users tasks. I am testing chrome and I.E.
View 1 Replies
Jul 6, 2010
I need to perform an operation such as extracting the data for past one year from DB and doing some manipulations and finally displaying the excel graphs for the extracted data. The extraction of data takes almost 6-7 hrs. What i require is that user enters the required data (date and some other details )through an asp.net page and submits it and then closes the browser. Now a process should get started which will extract all data and create the graphs and finally send an email to the particular user.
View 6 Replies
May 30, 2013
My program need to detect the user visibility, if the user is login or not. I Put the information on the database
here the pseudocode:
if the user click "LOGIN" I Update the user information to ONLINE = TRUE;
else if the user click "LOGOUT" I Update the user information to ONLINE = FALSE;
My Question is: How can I detect if the user leave the website or turn off the computer without clicking "logout"
View 1 Replies
Jul 2, 2010
How do i call click event of a button once my pop up window closed? My code is below:
[Code]....
I would prefer not to add anything in my popup window ftb.imagegallery.aspx
View 1 Replies
Feb 28, 2011
I am using Wizard Contorl in one of my project, I want to maintain the state of the wizard control at any step .Let me explain further , let suppose when user is at Step 4 out of Step 10 and then user would close the browser so the state should be persisted and when the user come back again to the same URL the step would be 4.
View 1 Replies
Oct 31, 2011
I have started using an SQLState server to store my objSessionData object and many more session data.
<sessionState mode="SQLServer" sqlConnectionString="Server=**********;UID=*****; PWD=***" cookieless="false" stateNetworkTimeout="20" timeout="60" />
I open two browser, log into the application, proceed in a few pages to store some information in the objSessionData for both browser (2 differrent session).If I close the first broswer, and now keep on going on the 2nd broswer, everything that was in session is now lost.It looks like Session 1 detroyed session 1 and session 2.I have tried to change the cookieless to TRUE and when it is set to TRUE, I do not get this problem at all.
View 9 Replies
Feb 25, 2016
[URL] ....
By using above query its fine to save logout time in database, if the user unfortunately close the browser without logout then how to store logout time in database...
View 1 Replies
Dec 14, 2012
I used javascript code to open popup window.Popup window "Maximize" button is in
disable state.But in Chrome it is in enable state.I want to make browser maximize button disable.
Below is my javascript code
function Call_PopUp(event, URL) {
window.open(URL, 'CustomPopUp', 'width=990, height=540, menubar=no,scrollbars =yes, resizable=no, top=50,left=50,toolbar=no,dialog=yes,minimizable=yes,maximizable=no');
}
View 1 Replies