I have a web application which uses a session variable to store the logged in userid. If no user is logged in, of course this variable will be empty and the contents displayed on my website are meant for guests. If there is a user logged in, the user specific controls/access/links will then be a displayed.
I am now having issues with my hosting where on shared application pool, the worker recycle is triggered every 90 minutes, this will clear sessions causing all my users to be logged out. I opted for a dedicated application pool, which got worse because I am only allocated 50MB memory limit and if this is reached, the worker recycle is triggered and I lose my sessions again. I have tried as much as possible optimization techniques, e.g. dispose where possible, close connections, disable viewstate for static controls etc but my memory per instance keeps building up from page to page without any signs of improvement. I don't use loops nor store huge objects like bitmaps etc but my sessions are now gone even faster than 90 minutes in shared application pool before.
I have considered using SQL Session State but there isn't a simple guide on using this with MySQL. I am getting desperate and considering using a public variable, a string as a replacement to store logged in user id instead of in a session variable. I am pretty sure this will solve my issue with sessions being recycled but are there any negative consequences of doing this? One problem I can think of is if the user closes the browser, the system will never know that the user is now logged out and this public variable should be nothing. In this scenario, will the GC eventually clear this abandoned public variable.
I have AjaxAutocomplete textbox but its not taking session parameter, when I am typing some words its showing all data without any filter, means its not taking session variable after where, in select query.
I searched on this all morning, but I'm still not sure. If I create a session variable to pass some data between a couple of pages, does that variable time out after it reaches the timeout period set on IIS, or will it persist for the entire time the user keeps a session alive? For example, session variable is used shortly after login and then never again. Susy uses other pages for two hours and keeps session active. Did that first session variable die after 20 minutes, or is it still there 2 hours later?
i have a gridview with link button and one field called "ID" i have five values....when i click the link button that row value ill show in next page in textboxes ,txtid, txtage, txtsalary,......... if i click that link button that "Id" values should pass to next page using "SESSION" variable in C#.net
in my web app users login to website normally and they have tagged in user table in database as online user in Session_End i want to log them outIn Session_End i have no access to HttpContext.Current.Session or Session only they are both null how can i access to session variable at (Session_End) event.
I have two projects ,one is webforms and other is Business logic, i am storing username in Session Variable, i have audit module in businss logic which has event handlers to do auditing on object create / remove. i want to store username in audit trail, i want to save username in some global place which is session bounded so that i can get the username in my audit module.i dont want to refer System.web, or httpcontext in my businesslogic project.pls help how i can acheive this. i found this article but cudnt understand much.
"Now one option if you want to have your DLL pull the stuff from Session is to abstract out session. So you could define an interface like IStorage, that your library will know how to use. Then you can have a SessionStorage or MemoryStorage class and use IoC to inject the appropiate class into your library classes. This gives you the freedom to code it how you wanted it to be coded without tying your code to Session. Oh and one other benefit if done properly can be used to not tie your code to session in the web either.
I am have declared a session variable in login page of my application. I want to access that session variable in Application_BeginRequest of global.asax file. But I am not able to do it. Could you please suggest how to access the session variable in my global.asax file
Currently in an .aspx file, I am storing a value (filename that was created in that session) in an hidden text box. When the user clicks on the "Print" labeled Hyperlink control, it opens the file that was stored in the hidden text box control. But when the user goes to different screen (in the same session), I loose the filename value that is stored in the hidden text box control. So I would like to store the filename variable in a session variable. So that if the user leaves this .aspx file and comes back to this .aspx file I can load the value into the hidden text box from the session variable.
I got the login to work fine- go to [URL]if you want to give it a try. Here is the thing. The profile functionality doesn't work. It draws from the same set of files, it used the same connection string as the users, it work on my local machine, but blows up on GoDaddy because it cannot find the file, and when it tries to create it. The file it uses for the profile, aspnet_Profiles, is on there along with the rest of the membership files. The connection string is not defined individually. Why is it finding the user files, but not the profile file.
i need certain algorithem/formula or code where admin assign userid/password to user ,means multiple user get registered site but user id and password are assign by admin after registered . did not any thing on google yet !!