Is Serialization required in .net 4.0 ?

Posted by Chvrsri under WCF on 1/17/2011 | Points: 10 | Views : 2270 | Status : [Member] [Moderator] [MVP] | Replies : 6
Hi all,

Generally inorder to store the Session data we need to serialize the data so that an object is converted into a stream of bytes. So that we can retrieve it .

But my doubt is can we directly store the Session Data in an object and retrieve it in .net 4.0 ? is there any special feature added ???

Thanks,
Radha Srikanth



Responses

Posted by: Karthikanbarasan on: 1/17/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

As far as i check i dont see any such feature, we need to convert i guess... If any one find out let us know

Thanks
Karthik
www.f5Debug.net

Chvrsri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kumarsudu on: 1/17/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Radha srikanth,

Mr.Karthik is true, that we have to serialize the session data and store it, but in asp.net 4.0, Microsoft has produced a new feature Known as compressionEnabled=true

<sessionState allowCustomSqlDatabase="true" sqlConnectionString="data source=localhost;Initial Catalog=testdb" compressionEnabled="true" />

compressionEnabled="true" means that all the session data that is transferred between the client and the server can now be compressed, resulting in better performance.

Hope this helps you.

Thanks and Regards,
Kumar




Chvrsri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chvrsri on: 1/17/2011 [Member] [Moderator] [MVP] Silver | Points: 25

Up
0
Down
hi Kumar,

I understand wht u said regarding performnace. But my actual question is can we directly store the session data in an object without type casting it and can we retrieve it . Can this be made possible with 4.0 ???
Iam sure there is no such feature with previous versions , But not so sure with 4.0 hence i raised this question .....

Thanks ...

Thanks,
Radha Srikanth

Chvrsri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/17/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi Radha,

I checked it, you need to type cast and use it

Thanks
Karthik
www.f5Debug.net

Chvrsri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chvrsri on: 1/17/2011 [Member] [Moderator] [MVP] Silver | Points: 25

Up
0
Down
Oh ok ... Will c once again then.. Thanq Karthik....

Thanks,
Radha Srikanth

Chvrsri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 1/17/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Sure.... Let us know if you find anything :)

Thanks
Karthik
www.f5Debug.net

Chvrsri, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response