Any issues and storing XmlDocument in Session Object?

  • Thread starter Thread starter SamIAm
  • Start date Start date
S

SamIAm

Hi All

I need to store some xml during a users session. I need to perform
modifications to the xml throughout a user's session. Instead of storing in
as a string and loading up an XmlDocument every time I need to make modi, I
thought I would rather store the XmlDocument itself.

Are there any issues with doing this?

Thanks,

S
 
XMLDocument is not Serializable, so you can not store this object in session
if you are going for session state option as stateserver or sqlserver . If
you are going to have session only as Inproc then it shouldnt be a problem.
But its not advisable to store nonserializable object in session.
 
Hi,

One think that I can think of is that XmlDocument isnt serializable so
you can't use session options to store session data on remote machine /
database. Those session options are needed in load balancing scenarios.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
 
Back
Top