State Management :: Memory Management - SessionState Collection

May 5, 2010

I have a problem regarding the SessionState Collection.I retrieve an object

[Code]....

I thought that i access a reference type. But calling the default constructor to build a new object seems not to work.The next time I access the object I still get the old one.

View 2 Replies


Similar Messages:

State Management :: SessionState Across Frameworks?

May 13, 2010

[Code]....

From my understanding, the asp.net 1.1 application will login the user then store the information to a session and a cookie? I'm trying to access that cookie with a asp.net 2.0 application. Is this possible?

I'm thinking the mode would need to change to maybe StateServer or Sql.

View 14 Replies

State Management :: SessionState Timeout Vs. Httpruntime ExecutionTimeout?

Jun 30, 2010

what the difference between

SessionState Timeout

and

HttpRuntime ExecutionTimeout

is? Both in web.config. I want to increase or reduce the timeout in my webapplication. Means: If a users idles more than 10 min. the should get timed out.

View 2 Replies

State Management :: Session Does Not Get Saved If SessionState Mode Is StateServer

Mar 16, 2011

My session variables don't get saved if the SessionState mode in the web.config file is set to StateServer. But when I changed it to InProc, then everything is fine and good. I'm trying to save a custom built object (or class) into the session after the user logs in.

View 4 Replies

State Management :: Saving Sessionstate Variable On Button-click?

Nov 12, 2010

I am performing my first steps with ASP.NET for my employment.Yesterday I tried to perform saving a value to a sessionstate variable, but it does not work.I am using C# and want to code in .NET 3.5. [Code]....

The click performs a postback to a second website where the value is to be displayed on a simple label.The value I initialized in the Global.asax is saved to the variable and then read on the second page, but I cannot manipulate it using the textbox and the button on the first page. I just don't get it...I even tried on different machines and different VS editions.

View 7 Replies

State Management :: SessionState Works In VWD 2010 Debug, IIS 5.1 But Not On WS2008 (IIS7.5)

Sep 8, 2010

I'm building a site using the .NET 4 framework using routing and MasterPages.

Because I'm using both routing and MasterPages, I can't see any way how to get value from control on the previous page. To solve this I've used the code behind to store the control's value in a session variable. Is there a way to retrieve a value from a control using PreviousPage or something when using Routing and MasterPages?

This works fine in VWD debug mode and in IIS 5.1, but when I try to deploy it on my Windows Server 2008 (IIS7.5) machine, it get this error:

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.

Here is a copy of my web.config file:

[Code]....

View 4 Replies

State Management :: Memory Size Of Session / ArrayList?

Apr 24, 2010

I am using ASP.NET 2.0.

In my applicaion, I store some values in an ArrayList and store this Arraylist in a session variable. I want to know the size of this session variable in memory. Is there any method to do this.

View 6 Replies

State Management :: Multiple DataTables In Memory - Best Practice?

Jul 9, 2010

I have a DataTable which holds information on truck routes. When the user click on a route it display another table with details about the stop along that route. When they click a stop it shows what items were picked up at that stop. Three separate pages with 3 distinct DataTables. Currently I am storing them in the session. Normally, I would use the view state since the data only needs to live on that page. The reason I use the session is because each page is part of a Master pagelayout. There is an export button in the master page which gets the data in the session and exports it to an excel file. The issue is that when the user goes to the item level detail and uses a quick navigation link back to the route information the data for route is not reloaded into the session, just the page. If the user clicks export it will export the data set from the item level detail even though it is not displayed on the page

View 4 Replies

State Management :: Putting Lookup Tables In Memory?

Sep 17, 2010

How is the best way of putting a lookup table in memory for use though my ASP.NET app? Should I do this in the Global.asax's Application_Start event and keep in Session?

View 6 Replies

State Management :: Deleting Data In Cache Memory?

Mar 4, 2011

I have a webpage which displays some data along with a banner. The banner image is stored in the database with parameters "Pagename" and "form".

The application has been coded in such a way that when the page loads , a function checks for the banner in cache memory first with the parameters "pagename" and "form". It the banner does not exist, the new banner is retrieved from the database and is added to the cache memory. Next time when the same page is called, the banner is displayed from the cache memory avoiding the DB to be hit everything to get the banner.

Now, I do not want a specific banner to be displayed on the page. I have removed that banner from the DB but the banner still gets displayed as this banner is still there in the cache memory.

Is there any way to delete the banner which exists in cache memory without making any code changes?

View 5 Replies

State Management :: Lost Some Values From Collection Stored In Session Variable?

Jul 27, 2010

I am creating a presentation on basis of some selected values and maitaning the selected values in a session variable named Session("userPref") in collection form.

Now I am opening a TablePreview.aspx page by javascript window.open() function.

On Page_Load of TablePreview.aspx I am reading some values of Session("userPref") and doing some operatons.

For saving the presentation I have created a page wizardsave.aspx.

Now I am opening the wizardsave.aspx from TablePreview.aspx by window.open() function for saving presentation, but on Page_Load of wizardsave.aspx. I found that some value from collection stored in Session("userPref") have lost.

View 4 Replies

State Management :: Cache System.Collection.Generic.List Object?

Aug 22, 2010

I need to cache System.Collection.Generic.List object with expiration time

var Root = from feed in feedhotel.Descendants(ota + "HotelContent")
where (feed.Attribute("HotelCode") != null)
select new xmlhotel()
{
};
return Root.ToList();

Is it possible to cache Root.ToList() for some time....

View 1 Replies

State Management :: Client And Server Side State Management?

Feb 25, 2011

when we go for client and server side state management in asp.net

View 2 Replies

State Management :: Remove Item (Cookie) From Basket (Cookie Collection)?

Sep 8, 2010

I am busy building a shopping cart with cookies. I have datalist which I populate from the cookies with a delete button next to each cookie

[Code]....

Now the problem is that when I hit the delete / remove button to expire the cookie, what happens when repopulating the datalist is that it shows the original cookie with all it's values as well as a new entry where all the values are blank.

View 3 Replies

State Management :: Session Management In Web Farm Scenario?

Oct 7, 2010

My ASP.NET 1.1 application is using load balancing servers. Before load balancing servers, there is no problem related to session management. After googling, I found the following two points:

1) Website instance ID must be same on both the servers. When I ran Microsoft provided VB Script to check instance ID. On both the servers, they are same.

2) I have also generated a unique machine key and pasted it in the machine.config on both the servers.

View 9 Replies

State Management :: How To Custom Controls And ViewState Management

Aug 24, 2010

I want to know that when we create custom controls, then is there State Management through ViewState done automatically or we have to handle it explicitely ?Since i have created Custom Controls that is behaving as if it is not maintaining its state on PostBack.

View 9 Replies

State Management :: Creating Custom Session Management?

Nov 10, 2010

I want to know how can I write custom session management mechanism in ASP.NET. I do not want to use cookies or URL to have my session ID thus I think I can not use SessionIDManager. I will like to save the sessionID in a post variable and at server I will like to extract this ID to map with session.

View 3 Replies

State Management :: State Management Using Shared Class?

May 29, 2010

I am doing a POC of making my website run faster. Currently it stores huge object data in Session while passing information from one page to another. What I was thinking is to use shared methods and properties instead of session. It works, but wanted tocheck if this is an optimum way to do it. Below is the code that does not use session but still pass object data from one page to another:

[code]...

View 1 Replies

State Management :: State Management And Page Navigation?

Nov 18, 2010

i have a form on page1.aspx with several controls (textbox, dropdownlist, etc).on Page1 PageLoad event i load data from database and performe databinding.From Page1 a user can, by clicking a specific button, move to Page2.aspx to insert some details and, after saving details, he returns to page1.

if save changes are made on control on page1 before save them to db, obviously, these are lost on return from page2 (because are reloaded on pageload from db).How can i save control status between pages round trip?

View 3 Replies

State Management :: Get The Correct Concept For State Management?

Aug 16, 2010

i need to know the full concepts state manegemnt in asp.net,..in which site i will get the correct concept for state management....

View 4 Replies

State Management :: Recommendation On State Management?

Feb 7, 2011

We have an application that uses Session variables extensively for its state management. This application accesses data primarily from 1 of several SQL Server databases.

These databases have an identical structure but contain different data for each of our clients.The requirement has arrose for our users to have multiple windows and or tabs open while working in the app and herein lies the big problem.

Currently if a user where to open 2 or more windows or tabs and requests a page for Client A's Database,then opens the same page in a new tab and chooses info from Client B's database, then goes back to the first tab and hits refresh, it will now load that page with Clients B's data incorrectly, instead of Client A's data.

(Basically the client id is stored in a session variable that determines what connection string to use in my DAL, and everytime you choose which client to use it overrights that session variable with that clients id)Unfortunately querystrings exposes a security issue so I cant use that.

It does seem that sessions can be unique to browser windows, BUT not browser tabs.What would your recommendation be of handling an issue like this?

View 2 Replies

Memory Management while Programing Web Applications?

Nov 19, 2010

I want to know how we will manage memory while programing web applications and how to know if there is a memory leak.I have an application which gets data from a view available in sql server and refreshes the grid every 2 secs using Ajax UpdatePanel. This page runs all the time in the client machine.How can I check whether the memory is used properly when its run all the time and doesn't cause any memory leak problem or any system crash.

View 3 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies

State Management :: Custom Control: State Restoring For Controls Created With CreateChildControls

Dec 22, 2010

Let me explain, describing the scenario:In a custom server control (in my case, derived from CompositeControl), in the overidden CreateChildControls method I create a complex tree of subcontrols, using information from a db.The db provides both information on which controls I need to create (the user interface's structure) and the data used to fill these controls.Than the user can interact with the control and change the data (that becomes different to what stored on db).

My custom control lives in the same page where there are other controls, obviously.And these controls can cause a postback at any time.What I need is that my custom control keeps the data entered by the user across these postback, without reverting to the original data and loose the user data entry.

Here is the first doubt:

1)I create the subcontrols dinamically in the CreateChildControls at any page refresh (both on first call than on postback).I know that the framework solves the reference between the posted data and the controls I create in the CreateChildControls in order to set properties and raise control events, but can you tell me when and how it actually does this? In which phase of page life cycle? What happens after the CreateChildControls?

A second doubt:2)If the user interface structure must change as a consequence of the data entered, I had to execute CreateChildControls twice (the first time to recreate the original interface to get the events and the second time to create the new interface)
In which phase of page/control lifecycle do I have to make the second call to CreateChildControls? I do it on Prerender now, but is it right or wrong, and why?

View 1 Replies

State Management :: Unable To Serialize The Session State In 'StateServer' And 'SQLServer' Mode

Dec 12, 2010

I am new to .net 4.0 and am using EF Model and SessionState Mode=SqlServer and I am getting this error below:

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

I checked the stack trace and its complaining about

[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
[assembly: global::System.Data.Objects.DataClasses.EdmRelationshipAttribute("PoplarGroveModel", "tblMenuRole", "tblMenu", global::System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(PoplarGroveDataModel.Menu), "tblRole",

[Code].....

I marked it as serializable but then it complains about System.Data.Objects.ObjectContext is not marked as serializable and hence throws the same error.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved