Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another SessionState Question
Message
De
13/03/2003 02:06:12
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
12/03/2003 20:57:05
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00765224
Message ID:
00765268
Vues:
19
Bonnie,

Are you getting an error message when trying to restore the dataset from the session data? My guess is that you are running into a namespace or encoding problem.

Have you looked at the data stored in SQL Server after you save the session state?

>I'm getting different behavior when saving a DataSet to SessionState ... differences between using the default in-process Session vs saving Session to SQL Server.
>
>When using a regular DataSet, all seems to work just fine. But, when using a Typed DataSet (which all our DataSets are), it doesn't work for SQL Sessions but works fine for the in-memory Sessions. Any idea why? I get an error about deserializing the DataSet.
>
>Here's how I was doing this (where this.oData is a Typed DataSet):
>
>// to save to Session
>Session["oData"] = this.oData;
>
>// to retrieve from Session
>this.oData = (MyDataSet)Session["oData"];
>
>
>I've worked around it for now by serializing the DataSet to XML and saving the XML string as the Session variable and then getting it back into the DataSet with ReadXML() (but I may run into other problems with that ... not sure yet how this will affect deleted rows ... I'm still researching this).
>
>Anyone know why the behavior is different? Why should it not work just because I'm saving the Session variable to SQL? Anything else I need to do differently?
>
>~~Bonnie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform