What is <machinekey > and how to generate machinekey iis
MachineKey is used for:
- ViewState encryption and validation
- Forms Authentication uses this key for signing the authentication ticket
Machine key can be generated in IIS 7/ IIS 7.5 by following steps listed below
1. Open the IIS Manager.
2. Click on the Machine Key icon in the ASP.NET feature list as displayed below
System Will default method:
<configuration>
<system.web>
<machineKey decryptionKey="Decryption key goes here,IsolateApps"
validationKey="Validation key goes here,IsolateApps" />
</system.web>
</configuration>
MachineKey in web.config
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<machineKey validationKey='5FFC6B71B2F9759DC3D84D13BC0AFC3D94131C084877C74BB75E3714E22DC4EDE4F475817B5E7036D9020218B59C81DCE466A6FD2EC814BCC522A49AE13AB849' decryptionKey='46D9D0699B89DA8087CCC6C03709BB686D53D3703D864D2E' validation='SHA1'/>
</system.web>
</configuration>

0 comments:
Post a Comment