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):
Session["oData"] = this.oData;
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