Machine Key Section validation and decryption key rotation on build

Rotating keys, making their lifetime shorter, decreases the attack window size and that is a good thing.

For instance when using ASP.NET forms authentication the cookie can be encrypted when the `protection`-attribute is set to `all` – see here.

I thought it would be handy to automate the rotation of keys during the publish phase of a web project. So here is a target file to be included into a web project.

Add comment