Search code examples
asp.net.netencryptionweb-configmachine.config

Adding machineKey to machine.config


I would like to add the machineKey to my machine.config since I am working with programmatic encryption of web.config connection strings in a web farm scenario.

My question is, where do I place the machineKey in the machine.config file? There isn't one already there that I can replace, I suspect it's being autogenerated, so where should it be placed?


Solution

  • Just place it under <system.web>

    If you need a key generated, use the process as shown in this SO post