Skip to content

Instantly share code, notes, and snippets.

@Digiover
Created January 16, 2018 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Digiover/15e6045c4bcfe9a82ac075401bdd1807 to your computer and use it in GitHub Desktop.
Save Digiover/15e6045c4bcfe9a82ac075401bdd1807 to your computer and use it in GitHub Desktop.
Encrypt ASP.NET ViewState
<machineKey
validationKey="AutoGenerate,IsolateApps"
decryptionKey="AutoGenerate,IsolateApps"
validation="AES" decryption="Auto"
/>
@Digiover
Copy link
Author

put this in the <system.web> node of your web.config

@Digiover
Copy link
Author

Digiover commented Dec 4, 2021

Switch from AES to HMACSHA512:

<machineKey
	decryption="Auto"
	decryptionKey="AutoGenerate,IsolateApps"
	validation="HMACSHA512"
	validationKey="AutoGenerate,IsolateApps" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment