473,324 Members | 2,356 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,324 software developers and data experts.

StateServer and Serialization

Hi,

I am currently migration my session state from InProcess to StateServer.
I notice that the object that i want to put in the session must be
serializable.
What about the objects like DataTable and Hashtable, how can i keep than
into the session, i don't think they are serializable. What if i am create a
collect object and make it serializable, does the object in this collection
object must be serializable too?
May 8 '06 #1
3 1842
for an object to be serializable, every property must be serializable. if
its a collection, then all objects in the collection need to be
serializable, otherwise would good would serializing a collection out and
restoring it if it did not contain the same objects.

a hashtable can be serialized, it it only contains serializable objects.
DataTables are also serializable. almost all components (objects that
implement Dispose), are not serializable.

-- bruce (sqlwork.com)

"Coco" <Co**@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
Hi,

I am currently migration my session state from InProcess to StateServer.
I notice that the object that i want to put in the session must be
serializable.
What about the objects like DataTable and Hashtable, how can i keep than
into the session, i don't think they are serializable. What if i am create
a
collect object and make it serializable, does the object in this
collection
object must be serializable too?

May 8 '06 #2
There are some caveats to serializing a Hashtable.

See my blog here
http://spaces.msn.com/sholliday/ 9/21/2005 entry

and/or
http://www.mattberther.com/2004/06/000487.html
...
"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com> wrote
in message news:uD**************@TK2MSFTNGP04.phx.gbl...
for an object to be serializable, every property must be serializable. if
its a collection, then all objects in the collection need to be
serializable, otherwise would good would serializing a collection out and
restoring it if it did not contain the same objects.

a hashtable can be serialized, it it only contains serializable objects.
DataTables are also serializable. almost all components (objects that
implement Dispose), are not serializable.

-- bruce (sqlwork.com)

"Coco" <Co**@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
Hi,

I am currently migration my session state from InProcess to StateServer.
I notice that the object that i want to put in the session must be
serializable.
What about the objects like DataTable and Hashtable, how can i keep than
into the session, i don't think they are serializable. What if i am create a
collect object and make it serializable, does the object in this
collection
object must be serializable too?


May 8 '06 #3
Hi Bruce,

Thanks for the reply.
If datatable is serializable and the objects inside the serializable object
must be serialized, what would happned to DataRow then? DataTable contains
the collections of DataRows and i notice that DataRow is not serializable

Thanks
Coco

"bruce barker (sqlwork.com)" wrote:
for an object to be serializable, every property must be serializable. if
its a collection, then all objects in the collection need to be
serializable, otherwise would good would serializing a collection out and
restoring it if it did not contain the same objects.

a hashtable can be serialized, it it only contains serializable objects.
DataTables are also serializable. almost all components (objects that
implement Dispose), are not serializable.

-- bruce (sqlwork.com)

"Coco" <Co**@discussions.microsoft.com> wrote in message
news:8E**********************************@microsof t.com...
Hi,

I am currently migration my session state from InProcess to StateServer.
I notice that the object that i want to put in the session must be
serializable.
What about the objects like DataTable and Hashtable, how can i keep than
into the session, i don't think they are serializable. What if i am create
a
collect object and make it serializable, does the object in this
collection
object must be serializable too?


May 10 '06 #4

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

Similar topics

2
by: Maximus | last post by:
Hi Everyone, I was using Inprocess session objects, but incase of aspnet process crashes the session objects were lost as a result I decided to shift to out of porocess session objects. For this...
1
by: Bill L | last post by:
Hi Guys, I found a wired problem with writing HashTable object into StateServer Session, the HashTable object is serializable, but after serialization, it converts to stream and stream is from...
0
by: Nils Hedström | last post by:
I have some problems with my stateserver. First my setup: I am running ASP.NET 1.1.4322 SP 1.1 on one computer and the stateserver on another computer. Both of the machines are Dell Poweredge...
2
by: jakk | last post by:
Below is the exception that Iam getting. It says that the DataView that Iam storing in the session is not Serializable. BUt works fine if I store in the inproc session and fails if I switch to...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
0
by: Krishnan | last post by:
Hi, Am having a .Net object which has a COM object as one of its properties and hence normal serialization of the .Net object for StateServer held session doesn't work. To get over this, I...
6
by: tshad | last post by:
I switched my site from InProc to StateServer a while ago which solve a problem I was having dropping my session cookies when the worker process recycles. This has been working well until today....
4
by: archana | last post by:
Hi all, I am new to web services. I am using stateserver to stored data which i set using session. I changed mode in web.config file to StateServer. But didn't change tcipip address. I kept...
4
by: anandsoni | last post by:
I have been working with a project where I need to deal with lot of data. This data includes 10 thousands of records in the data grid. There are thousand of users connected to the application, this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.