How to Generate Machine Key using IIS

Created On : Mar-09-2015 Author Author : Wasif Shahjahan
This post will guide you through the steps to generate Machine Key using Internet Information Services (IIS) Manager.

Press Win+R key in combination to bring up the ‘Run’ dialog box.

Type ‘
inetmgr’ in it and hit the ‘OK’ button.

Internet Information Services (IIS) Manager screen should be opened.

Double click on Machine Key. Machine Key section will be opened.

Machine key section of Internet Information Services (IIS) Manager
In the Machine Key section you can change the Validation method and Encryption method using drop down, default is SHA1 and Auto respectively.
Click Generate Keys from the Right Actions Pane.

Generate Machine key using Internet Information Services (IIS) Manager
Now you have new Validation key and associated Decryption Key. You can use this in the configuration file of any application using below code snippet:

<machineKey validationKey="883A787F3B793567817EA540DCA4285B1A695C58A38B3493E1E69821148E5E6B5032F61813DF81B9731AB5F8AF7ECA3A75429E38D6513408E86ED4AC77243439" decryptionKey="7F0884CE1698D23538D4FC3670FD122FCF856645518617B7" validation="SHA1" decryption="Auto"/>
Or if you want to use the key in same application click Apply in the Actions pane and the machine key will be updated in web.config.

comments powered by Disqus