Serializing objects to State Service

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

We have written an asp.net app to use the Session object and will be using a
web farm, therefore we are going to use out of process
serialization using the asp.net state service.

We have a question as far as object references go within our objects that
will be serialized in session.

Here's the object.

A - my parent object
B - child collection object member variable in object A
C - child item object of collection B


So, if the items (C) in the collection B contain a member variable reference
to the top most parent object A, when the object is deserialized from
session, will the reference to the A object from the C objects be restored?
So , if after we get it back out of Session and modify A, will the C objects
see those changes we made to A because the reference still holds?


Hope this made sense. Kind of hard to explain.

Thanks.
 
as long as every object referenced supports serialization it will work. when
collection is serialized, it just asks each if it objects to serialize
itself.

note: there are lots of .net objects that will not serialize and if any you
your object references one, you will have to write your own serializer.

-- bruce (sqlwork.com)
 
Back
Top