Shashi
Shashi

Reputation: 1

Struct type serialization problem in c#

I have implemented a sqlserver Session state mechanism to save my session in database but I am getting a error of Session state serialization. And my class contains struct types and I have added the Serializable attribute on top of that.

Upvotes: 0

Views: 578

Answers (2)

Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65411

You need to add the Serializable tag to all classes that will be stored in your session.

Upvotes: 1

EOG
EOG

Reputation: 1747

Try impelementing ISerializable interface

Upvotes: 0

Related Questions