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.
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.
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.
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.
I have several pages in my application. I have used a session variable called "Session["Variable"]" that is set in page1 and page2. That means The scope should be in page1 and page2. If you go out any of these page will clear the above session variable. Is there any solution to clear the particular session varible in the application level. i.e i don't want to write the code for each and every pages...
I'm using asp.net 4.0 with asp.net MVC 2.0 and the asp.net membership provider.
I need to terminate a the user session before I delete it. Otherwise if the user is still authenticated the next time it will visit a page null reference exceptions will occur when trying to access the user data and profile.
I get the Session.Abandon() method but what I'm looking for is the same on a user, something like user.AbandonSessions().
on the click of logout_linkbutton.but when i click back button in browser its go back to previous page. But when i click on any control it will redirected to Default.aspx.
I have created a website. I login with username and password and after authenticating i redirect the user to Home Page. When the user clicks Logout, they are redirected to the Login Page. But after this when i click the BACK button on the browser, it again goes back to the Home Page with that user's login credentials. I have used Session["username"]=null in the Page_Load function of Home Page. How to avoid going back to the Home Page when the BACK button is clicked by the User??
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.
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...
I have a page (parent) that open up a popup window using window.open javascript. User will then work on the popup window and the result will be stored in a session variable. When the user close the popup window, how can I put the value of the session variable back to the server control textbox of the parent window?
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).
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.