SaravananArumugam
SaravananArumugam

Reputation: 3720

Where does the Encryption of ViewState (ViewStateEncryptionMode) happen?

It could be a basic question on this topic. I am reading that the View State can be encrypted, by setting the ViewStateEncryptionMode.

Even when the ViewStateEncryptionMode is not specified, the __VIEWSTATE hidden filed seem to be having encrypted values.

Assuming this is based on the default value ViewStateEncryptionMode.Auto, I set the page's ViewStateEncryptionMode to Never. Still I see the same value (in encrypted form) in the hidden field.

Is ViewStateEncryptionMode is dealing with something else than, the __viewstate hidden field? Please explain.

Upvotes: 0

Views: 914

Answers (1)

Icarus
Icarus

Reputation: 63966

Even when the ViewStateEncryptionMode is not specified, the __VIEWSTATE hidden filed seem to be having encrypted values.

No, the ViewState is BASE64-Encoded, not encrypted.

For instance, go to this page: http://lachlankeown.blogspot.com/2008/05/online-viewstate-viewer-decoder.html and copy and paste your ViewState's value to decode it.

For this page: http://www.telerik.com/support/demos/developer-tools-demos.aspx

returns this: decoded view state

Upvotes: 4

Related Questions