State Management :: Can't Update Progress Object?

Oct 26, 2010

Anyway, I currently have a ajax based progressbar, which works like this: my long-task stores progress in session. Async callback retrieves progress from session, progressbar is updated. Everybody is happy... not! This only works when the "main loop" of the time-consuming task runs in either codebehind or a class with httpcontext. But all my businnes objects cannot do such thing. So, the next natural spet would be to say "move it to a static class" ProgressHelper or something, but since static classes are shared across all appDomain, I would bump into concurrence problems. So, can i have say a "static list progress" say progress["session1_progress"], progress["session2_progress"], progress["sessionN_progress"]? I cannot really see a way to update progress from inside a task in a business object, which i might want to use also in other plattforms like a desktop app?

View 7 Replies


Similar Messages:

State Management :: PollLockedSessionCallback Error After Migrating To 2.0/ Object Reference Not Set To An Instance Of An Object

Aug 19, 2010

We have an applicaiton that was converted to the new framework using the wizard in Visual Studio 2008. When we install the applicaiton in production and change the iis settings to use the 2.0 framework we start to see these errors in the event viewer on the web servers. We are using SQL Server Session State and have 3 web servers in a load balancer. Object reference not set to an instance of an object.</Message><StackTrace> at System.Web.SessionState.SessionStateModule.PollLockedSessionCallback...

View 1 Replies

State Management :: LoadViewState - Object Reference Not Set To An Instance Of An Object?

Jul 16, 2010

I have a problem.This particular code when used on local machine is working fine, but when it is used on serverit gives an error like " Object reference not set to an instance of an object.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object._isRefresh = _refreshState == (bool) Session["__ISREFRESH"]; "

View 1 Replies

State Management :: Unable To Cast Application State Object?

Nov 3, 2010

global.asax:-I have defined a struct (my_struct)-I add a List of structs (List<my_struct>) to Application["MyList"] In default.aspx:-I have defined the exact struct (my_struct) and want to cast the Application["MyList"] object to the List of structs.

example: x = (List<my_struct>)Application["MyList"];

I receive this error "Unable to cast object of type 'System.Collections.Generic.List`1ASP.global_asax+my_struct]' to type 'System.Collections.Generic.List`1[_Default+my_struct]'

View 1 Replies

State Management :: Session State Object Configurations

Nov 9, 2010

[Code]....

View 3 Replies

State Management :: How To Store Object In Cookie With C#

Apr 10, 2010

I'm using session to store C# object but my session is expiring regularly.

I've given 540 minutes for session timeout. ( <sessionState mode="InProc" timeout="540"/>)

Now I want to use cookie instead of session to remove this timeout problem.

code below:

[code].....

View 17 Replies

State Management :: Make Serialization For Object

Feb 18, 2011

I have code :

[Code]....

Is it right?

View 4 Replies

State Management :: How To Serialize An Object Into Cookie

Apr 1, 2010

I had an xml-serialization which worked fine, but as I have just knew it doesn't work in Opera browser. I think, it's security rules don't allow to write to cookies xml-content.What can I do? Can I use binary serialization or something else?

View 2 Replies

State Management :: Persisting A Class Object?

Nov 5, 2010

I wish to persist a class object across postbacks by using a single session variable/object/whatever.

The class has about a dozen single variable properties; and about a dozen table properties; and several methods. The main table tracks rows of sporting event results. The web site will collect one row at a time for each postback. The data in the object's constructor is based on a dataset, but the data in the class will grow each time I do a postback so I don't want to loose the information in the class. The data isn't very big - it will fill a single computer screen.

Being new to programming I am thinking that I can store the dataset in the session but that would slow down the response time because I the methods would have to be called to refine the data - or maybe I can just store the entire class object in a session.

View 3 Replies

State Management :: Use An Object From The Cache In A Mvc View?

Sep 24, 2010

I am working with asp.net mvc and i am trying to get acces to a object that is in the cache.In the Application_Start() of Global.asax.cs i create and store an object in the cache like this:

Translator translator = new Translator();
HttpContext.Current.Cache.Insert("Translator", translator, null, System.Web.Caching.Cache.NoAbsoluteExpiration, System.Web.Caching.Cache.NoSlidingExpiration);

Translator holds a dictionary with translations.Now i want acces to this object from the cache to use functions and get values from the dictionary.I know i can acces it like this HttpContext.Current.Cache.Get("Translator") or Cache.Get("Translator") in the views But how can i use the functions of the object ? The meaning of the cache is to have a object that is accesable througout the webapp right ?

Do i have to make an object and asses the value of the Cache.Get("Translator") to it, so i can use the functions or is there another solution?

View 3 Replies

State Management :: Boggled About The Session Object?

Feb 11, 2011

On my local machine I've got a website running which uses the login control to authenticate a user and write a formsauthentication ticket to the client (which is also on the same local machine). At the login process it stores a a small serializable userobject in a session object named Session["appuser"]. Now when I open FF and login to the website all is fine so far... But here's the thing I cannot for the life of me figure out...

When I open IE8 and login to the same website, the session object which was created in FF is completely overwritten with the one created in IE. I thought that every session is unique, but now I'm really starting to feel my knowledge of sessions is almost next to nothing... Is there anyone out there that could tell me why I'm seeing this.

View 10 Replies

State Management :: How To Know If A Session Object Was Never Instantiated

Sep 7, 2010

how I can know if a session object was never instantiated?

View 1 Replies

State Management :: Object Is Byref And Shared?

Apr 14, 2010

I have a Session Varaible in which I am assinged a List of "MLoad" objects (Ex:- 10 MLoad objects) from the initial search. After that basing some icon click i am trying to get the new filtered results (Ex:- say 1 MLoad object) and assigning them to the public property "ListSearchResults" (See code below). When i do this the original results in the Session are changed(10 MLoad objects are getting replaced with 1 MLoad object ==> which just been filtered). What i have to do so that the "ListSearchResults" in Session is not changed. It is now byref, how to make it byval?

in acreate an object See below code and after retreving t

[Code]....

View 1 Replies

State Management :: Send Object From One Page To Another?

Aug 21, 2010

I want to create object in 1.aspx, and then send it to 2.aspx. This methods are bad, because:

1)Send object with url, like this:

http://www.example.com/?param1=123

This is not confidential.

2)[Code]....

This is bad too, because in 2.aspx this fields send to textboxes, and if user go to 2.aspx without 1.aspx,

View 2 Replies

AJAX :: Update Progress Control Ie8 - Progress Indicator Does Not Hide?

Feb 16, 2010

I have a wierd issue with the update progress control in ie8. I have a modal popup that loads a pdf in an iframe, then i have a button click that navigates away from the pdf and shows a form in the same modal. All this is wrapped in an update panel, which i have an update progress control associated with. The control shows correctly in ie7, firefox, safari, and chrome. But in ie8 when the async post back is complete the progress indicator does not hide, until I click on the screen or scroll the page, then it hides and the form shows.

View 3 Replies

State Management :: Lost Object Values In Postback?

Aug 10, 2010

I create a class with some atributes.In a web form, I declare a public object like this.Partial Class Intencion

View 7 Replies

State Management :: How To Save An Object Reference In A Viewstate

Nov 17, 2010

When I try to save an object reference in a view state it tries to save the object content using serialisation. to save the object reference only to apply to this object instance after postback?

View 5 Replies

State Management :: Why Need Serialization To Store A Object In The Session

Apr 26, 2010

I have a object of Class named "Employee" I need to store the object in the session. what happens if i do not serialize the object and store in the session.

View 7 Replies

State Management :: Session Key Gets Null While Object Alive

Jan 27, 2011

I have a Authorizeclient.aspx.cs page where I set my session value.Authorizeclient.aspx is a blank page. HttpContext.Current.Session["nodeID"]="0". This session value changes from 0 or non zero which depends on the value returned by Database. If no value is returned I assign HttpContext.Current.Session["nodeID"]="0" as the default state else I assign HttpContext.Current.Session["nodeID"]=resolve(nodeID).ToString()

Till this part it works fine as expected. However, I have a requirement that I need to read the nodeID from Session in other application on the same server. I mean this application too is part of the root project where I initially created the Session and set it. The strange thing is the Session["nodeID"] in application gets null "SOMETIMES" Not always. I am trying to read the Session in Page_Load. Sometimes it works fine and sometimes it gets null. Moreover the session object do not die and I can see other keys like Session["Themes"] etc there. The session is in InProc mode and have 20 minutes timeout time.

View 6 Replies

State Management :: Concurrent Access To Session Object

Mar 30, 2010

I am stuck with the issue of concurrent access to Session object. Actually my problem is i m writing to session in frame1 and trying to access that same Session object at the same time in Frame2's Page. I know about the reader/writer lock. I made the enablesessionstate = readonly in the page where i m writing to session. its giving me strange behavior on IE and firefox.

Its working concurrently in IE8 ( means page2 is diplaying modified values while page1 is changing the session object) but does not work in Firefox even page load is not called untill function on page 1 completed. Either anyone can fix my issue with firefox or there is new solution to reader/writer lock so that i can read the session at the same time while writing.

View 2 Replies

State Management :: Large Session Object Losing Value?

May 10, 2010

I have a asp.net application where I am saving off into session the user privilege information. From a grid I am bring up a new window by using the window.open. It seems that it is whiping out the values in session. A temporary bandaid I have placed on it is to recall the database if the value is nothing to reset the user object. I have found all over the internet that this is an issue with the window.open in IE 7 and IE 8. Has anyone else run into this and able to actually fix it?

View 4 Replies

State Management :: Session And Object Invalid Cast

May 21, 2010

System.InvalidCastException was unhandled by user code

Message=Specified cast is not valid.

Source=App_Web_donate.aspx.cdcab7d2.wqdohvu3
StackTrace:
at Donate.LoadUserDetails() in C:UsersSimonDesktopLocal SitesCats ProtectionNewDonate.aspx.vb:line 261
at Donate.btnDonate30_Click(Object sender, EventArgs e) in C:UsersSimonDesktopLocal SitesCats ProtectionNewDonate.aspx.vb:line 205
at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

InnerException:
I have made the important bits Bold I have the following code which is generating this error:

[Code]....

I am not entirely sure what is causing it. Its completley intermitent. I am storing all the details of a user filling in a form in a structure, and then assigning that structure to a session variable. This means if they page back, and then page forward again, I can pre-populate the form with the details they have already filled in for their conveinience by using the above code snippet. It appears that it works for a good minute, but if I leave the browser alone any longer than roughly 60 seconds, and then try and page forward to the form again, the exception will fire. While writing this post, the exception has occured in again in firefox, but interestingly, Google Chrome doesn't seem to have this problem. It looks like I can leave chrome alone for as long as I want and it will still work.

View 6 Replies

State Management :: Keep Updating Session Object With A New List C#?

Sep 30, 2010

I have a Session object

Session["MyListObjects"] = null;

When a user hits a button I want to creat a List<string> object and add to session object.

Let's say if user hits the button 10 times, I would get 10 List<string> objects and

add to Session["MyListObjects"] and

Finally I want to read all the List<string> objects from the session object.

View 4 Replies

State Management :: Making Object Available To Multiple Pages?

Feb 13, 2011

I have created a object in ASP.net C# that is a collection (arraylist) of Arrest Warrant objects. How do I make that object available to multiple pages?

View 6 Replies

State Management :: Can't Retrieve Session Object From Class

Jun 30, 2010

my solution currently has a website project and a class library project. I am attempting to access a session object from my class library but it is always returning null. In a settings class in my class library I store these values like so:

private static SessionProperty<WebUser> _currentUser = new SessionProperty<WebUser>("CurrentUser", delegate { return new WebUser(); });
public static WebUser CurrentUser
{
get { return _currentUser.Value; }
set { _currentUser.Value = value; }
}

I can access this just fine from any aspx page codebehind like so:

Settings.CurrentUser.User.ProviderUserKey.ToString();

However, if I attempt to do the same thing from a class in my classlibrary project it always returns null.

View 5 Replies







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