473,386 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can an event state be serialized


Suppose I have a windows service, with a FileWatcher class.

A file appears, and an event is raised -- but then the server is
rebooted or crashes.

When the server is rebooted, I want that event state to be where it was.

So, can an event be serialized?

And can it then be 're-raised' on the program that was responding to it?
Nov 17 '05 #1
1 1214
Whether or not event arguments can be serialized depends on whether or
not the designer of the event and arguments class tagged the type with the
Serializable attribute. If they did not, then those events are not
serialized.

Also, by default, if the server crashes or goes down, you will lose that
information. The only way around that which I can think of would be to
store the event information in a transactional resource (such as a DB or
MSMQ) and have an external process process those entries. This way, you can
process them in a transactional environment, and if the server is restarted
or rebooted, then you can be assured that the events will be persisted.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ja*****@texeme.com> wrote in message
news:35********************@speakeasy.net...

Suppose I have a windows service, with a FileWatcher class.

A file appears, and an event is raised -- but then the server is rebooted
or crashes.

When the server is rebooted, I want that event state to be where it was.

So, can an event be serialized?

And can it then be 're-raised' on the program that was responding to it?

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jabailo | last post by:
Suppose I have a windows service, with a FileWatcher class. A file appears, and an event is raised -- but then the server is rebooted or crashes. When the server is rebooted, I want that event...
7
by: Peter Verburgh | last post by:
Hello, Is there an easy way in C# to save a component (control) state (example. save all the property values from a button control) to a file (xml) ? Kind regards; Peter.
5
by: Frank | last post by:
Our system maintains session state using the ASP.NET State Server service. We expect some of our session state objects to be over 85K, which categorizes them to be VLO's (very large objects) in terms...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of...
27
by: Codemonkey | last post by:
Heya All, Sorry, but I think it's about time for a monkey-ramble. I've just had enough of trying to serialize even simple objects with VB. A simple task you may think - stick the...
4
by: Mark | last post by:
Assume you have a web application with many different web pages, and you'd like to avoid using cookies and storing session state in any form. Assume further that bandwidth and security are not...
2
by: 6tc1 | last post by:
Hi all, I'm inquiring about the mechanism that is used to implement event handlers in .NET (not really relevant, but I'm using C#). Anyway, I've noticed that I can pass an object in an event...
4
by: Abi | last post by:
We able to generate this error in our test environment and were able to research this enough to understand that the issue is NOT with an abject that needs to be serialized but rather as the stack...
2
by: Smokey Grindel | last post by:
I heard somewhere that in at least ASP.NET 2.0 you can remove the serialized view state from a page and have it stored locally in SQL server ot the ASP.NET state server service? so it doesnt...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.