Guest User

Untitled

a guest
Jan 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <machineKey validationKey="<SOME_VALUE>" decryptionKey="<SOME_VALUE>" validation="SHA1" decryption="AES"/>
  2.  
  3. var machineConfigMachineKey = (MachineKeySection)WebConfigurationManager.OpenMachineConfiguration().SectionGroups["system.web"].Sections["machineKey"];
  4. var webConfigMachineKey = (MachineKeySection)WebConfigurationManager.OpenWebConfiguration("").SectionGroups["system.web"].Sections["machineKey"];
  5. Response.Write("<pre>");
  6. Response.Write("<b>machine.config decrypt: </b>" + machineConfigMachineKey.DecryptionKey + "<br />");
  7. Response.Write("<b>web.config decrypt: </b>" + webConfigMachineKey.DecryptionKey + "<br />");
  8. Response.Write("<br />");
  9. Response.Write("<b>machine.config validate: </b>" + machineConfigMachineKey.ValidationKey + "<br />");
  10. Response.Write("<b>web.config validate: </b>" + webConfigMachineKey.ValidationKey + "<br />");
  11. Response.Write("</pre>");
  12. Response.End();
  13.  
  14. machine.config decrypt: AutoGenerate,IsolateApps
  15. web.config decrypt: AutoGenerate,IsolateApps
  16.  
  17. machine.config validate: AutoGenerate,IsolateApps
  18. web.config validate: AutoGenerate,IsolateApps
Add Comment
Please, Sign In to add comment