3.11.2013

Configure MachineKey When Deploying App In A Web Farm

One thing to keep in mind when deploying in a web farm is that if you are using form authentication, or ViewState, and you want to keep your session alive across the web farm, you need to specify an machineKey in the web.config file. This is how it looks like:
<system.web>
     <machineKey validationKey="C82FF1CB5C0B723C0C6682274C87AE0A32E957D05846F505A1968D30EB41B7C34175741FFC45C20D89915C05D133EDE69154E9EDC6B82F7B76B24009B09DF299" decryptionKey="A941AD982309BBC34B1D17C2E5C3A27298CB32EBB29C7AD94F513ACCE09B1F06" validation="SHA1" decryption="AES"></machineKey>
</system.web>
You should generate your own machineKey, here's a machineKey generator.
Reference from msdn.

No comments:

Post a Comment