Ignacio
when the app loads up, all the data is cached into data sets for the life of
the app (or whenever a data refresh is required), each class has its own
dataset and is called upon when required. I have 3 objects (using the same
class) that provide formatted data for 3 functions 1 in particular being a
data driven screen saver. When the app boots,it checks for data issues and
reports accordingly. During the day, the user can update their data using my
own publisher methodology . This effectively disposes all the objects and
rebuilds them using the same method as when the app boots. I am 99.9%
guarenteed that the data is correct, when the app boots and on refresh. The
issue is, when the screen saver has been working for i.e. 12 hours non stop,
the kiosk may want to be used, therefore by a customer pressing a button, the
app comes out of the screen saver mode and goes into search for items mode
(it actually uses an embedded ie browser to show HTML). Last night the app
having been in screen saver mode for 3 hours, was used and a null reference
exception (that was handled) was thrown. is there anyway I can periodically
refresh my objects that are not being used until required, without having to
reresh the whole lot. Thanks very much for your help, hope you understand
what is happening
Richard
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
It should be available all the time, at least as long as the appdomain is
active, maybe you get this errors at the start of the application, when the
data is being loaded.
if not give more details of the app. itself
cheers,
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Richard Steele" <Ri***********@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...I have a static object that gets referenced at application startup. This
object stores a dataset and various strings to be used whenever required.
This object may be called at anytime to provide the data and strings, but
can
be waiting for any length of time period i.e 24hours (this is not a
webapp,
but a kiosk winform). 99% of the time, the object is available and when
required provides its information. the 1% of the time, I get a null
reference exeception. Is there any method that will guarantee that the
object will be available for the lifetime of the application?
Any help will be of assistance, thank you
Richard