machineKey vs Data Protection
How did Web Farm auth/ViewState sharing work with machineKey on Framework, and what is the ASP.NET Core equivalent?
Answers use simple, clear English.
Quick interview answer
Framework web farms synchronized machineKey so forms-auth tickets/ViewState could decrypt on any node. ASP.NET Core uses the Data Protection API with a shared key ring (filesystem, Redis, Azure Blob, etc.). Without shared keys, cookies fail randomly across pods/nodes.
Detailed answer
Framework web farms synchronized machineKey so forms-auth tickets/ViewState could decrypt on any node. ASP.NET Core uses the Data Protection API with a shared key ring (filesystem, Redis, Azure Blob, etc.). Without shared keys, cookies fail randomly across pods/nodes.
Real example & use case
Persist keys to Redis so 5 Core pods accept the same auth cookie.
Pros & cons
Pros: cloud-friendly key storage. Cons: misconfigured ring breaks login.