session-state

How does variable scoping work in a POE session?

Can anyone explain how variable scoping works within a POE session? What is the proper way to pass state within the session, without impacting other sessions? Thanks Josh ...

How to save user entered data to session state from a dynamically created control?

using c# (asp.net) i'm programmatically creating several drop down lists (random number). the user selects a particular value from each list and i need to save the user selected value. if i try to save the data to session state by using a button click event it says the drop down list object hasn't been created. (obviously cuz i'm creat...

How can I get an ASP.NET Session variable into a javascript file?

I am refactoring a legacy web app. This app has a is using the onload event inside the body tag (On the Master page) to run this javascript script. Note this script tag is after the form element in the doc. I know the syntax looks hideous (or Visual Studio at least tells it is by the squiggles), but I'll be darned, the thing DOES indeed ...

How to use ASP.NET Session State in an HttpHandler?

I have an HttpHandler that is run on a client page (cross domain, not on our IIS server, etc) and when they click on our embedded link it fires off the Handler on our server. So far everything is working normally. I am now trying to use the System.Web.HttpContext.Session object but it is null. I am thinking it is null because we don't...

Sharepoint Master Pages and Session State

I’m using Heather Solomon’s minimal publishing master page, I’ve got a simple feature with an apsx page and a code behind file that does this public class SSInformPage : Page { protected Literal Literal1; protected override void OnLoad(EventArgs e) { //base.OnLoad(e); try { ...

ASP .NET Check for Session

I'd like to check for the existence of the Session in a base page class before I use it, but I've found that if it does not exist, it'll throw an exception just by checking: if (Session != null) { Session.Remove("foo"); } Will throw this exception: Session state can only be used when enableSessionState is set to true, either i...

State Management through Sql Server 2005

How we have to store session state in database??? Is there any configuration to store the Session & Application variables in SQL Server 2005 database. ...

Execute code on every request in ASP.NET MVC

I have a controller that all my controllers inherit from and I need to execute some code for every controller request. I tried the following: protected override void Execute(System.Web.Routing.RequestContext requestContext) { if (Session["mallDetected"] == null) { Session["mallDetected"] = DateTime.Now.Ticks; ILi...

Maintenance Plan for ASP.Net SQL Server SessionState (ASPState) Database

I'd like to clarify what the optimal maintenance plan set up is for the ASPState database that is used by ASP.Net SQL Server session state. The standard user database maintenance plan doesn't seem suitable. I'll never need to do a point-in-time restore of session data so it seems pointless to back up the database and transaction log fi...

Can you Render an ASP.Net control in a Non ASP.Net page via AJAX

We have an old page written in Classic ASP that makes calls to an existing .asp page through the Prototype library's Updater object. This call passed some query string parameters in w/ the request and received a list of params to update as well as a block of HTML/JS to render onto the main asp page. It seems that the page lifecycle c...

c# Delegates across postback

When i store a delegate (that points to a page method) in session state, retrive it after a postback and execute it the target of the delegate is the old page object and not the current one, is there anyway to change the target of the delegate so that it executes the method on the current page object ? I have thought about using a stati...

ASP.NET MVC: Best practices for keeping session state in a wizard-like app

Let's say I have a Web application implemented like a set of wizard pages to edit a complex object. Until the user clicks on the "Finish" button, the object doesn't get saved to the back-end system (a requirement), so in the meantime I have to keep the whole information about the object in some kind of a session state. Also, some of the...

Need to save block of data in ASP.NET between page refreshes in web farm without using inprpc or state server

I have an asp.net application running in a server farm. So In-proc sessions are out. There's no state server. There's a sql server database (can't be used for state server). There's no forcing same web server serving capabilities so no guarantee which web server will serve next page. I need to save a block of data (big object state) be...

Classic ASP session and Web Garden (multiple workers)

We are having issues with IIS6 slowdowns when using more than 1.2GB of RAM in a single worker and would like to use more workers. However looks like ASP sessions are made by worker and when the browser accesses some page through another worker it losts the ASP session. Do you have some tips on how to solve this problem? We are consider...

Who need to save data in session

Hi, i build a small application with asp.net mvc framework. I have one question. I built n-layer structure (controller -> service layer -> repository layer) of app and created a wizzard for collect data from user. Some data which comes from repository(data layer) need to save for next step(for example when user press back button on wizza...

Saving data to session in JSF

Hi there, I am new to the world of J(2)EE and web app development but am quickly navigating my way around it and learning a lot. Every day is a fantastic voyage of new discovery for me. I am currently working on a project in which I am using Visual JSF Woodstock on Glassfish v2. I am pretty new to JSF also. There are times when I ne...

How to clear SQL session state for all users in ASP.NET

I use SQLServer SessionState mode to store session in my ASP.NET application. It stores certain objects that are serialized/deserialized every time they are used. If I make any changes in code of the structure of those objects and I put a new version live, any logged user will get an error, as their session objects (the old version one...

InProc session data disapearing

I just noticed this about a week ago. I'm storing data about the current puzzle a user is playing (www.wikipediamaze.com) like this: HttpContext.Current.Session.Add("puzzleInfo", currentPuzzleInfo); I know that storing data in the session using the "InProc" mode is very volatile and will get reset whenever the web.config changes or any...

How can I notify a user that a session is about to expire in asp.net?

I intend notifying the user 60 seconds before the session expires in asp.net. I would like the user to choose to renew the session or ignore the notification. How can I achieve this in asp.net? ...

c# how to set up and use session state from preinit

OK so to set and read variables from the current session String Myvar =(string) System.Web.HttpContext.Current.Session[“MyVariable”] To set System.Web.HttpContext.Current.Session[“MyVariable”] = “NewValue” I can do neither, I get a System.NullReferenceException: Object reference not set to an instance of an object. from System.Web....