Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Out-of-Proc Session management with SQLServer
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00899601
Message ID:
00900599
Views:
22
Hi Carl,

I've done this and it works just fine, but for what it's worth this is not the greatest of ideas especially if you're talking about scalability with many users. Serializing a DataSet into SQL Server to save yourself a roud trip from SQL Server may not buy you much at all in terms of performance unless the query generating the data took a long time to run.

Anyway, I wonder if you've subclassed the DataSet? If you do make sure you mark it as Serializable because this attribute does not flow down to subclasses. Further if you added any non-serializable properties make sure you mark them as not serializable (I think it's [XmlIgnore]).

This may also be true of strongly typed datasets... in which case you might want to try get a reference to the REAL DataSet object underneath it and just serialize that.

Another thing to consider is to use the ASP.Net State Service which is considerably more performant than going to SQL Server as it's optimized to storing state data.

Regards,

+++ Rick ---

>To scale a web application to run in a web farm environment, one option to managing sessions is through SQLServer. However, if a you try to store a dataset to a session, an error results "Object must be serializable..." Ironically, the MS docs indicate that the dataset is serializable. Yet ASP.NET thinks otherwise.
>
>Has anyone figured out how to store a dataset in an out-of-proc session using SQLServer.
>
>This should work but does not:
>
>
>Dim ds As DataSet = MyBizObject.GetByID(myID)
>Session("myDataSet") = ds
>
>
>Thanks!
>
>Regards,
>Carl.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform