You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ASP.NET Core [Data Protection](xref:security/data-protection/introduction) is a library that provides a cryptographic API to protect data. Data Protection protects anti-forgery tokens, authentication cookies, and other sensitive data. However, in some distributed environments that don't put data protection keys in shared storage, when an app scales horizontally by adding more instances:
17
17
18
18
* It's necessary to explicitly configure Data Protection to establish a shared storage location for Data Protection keys.
19
-
* There’s ***NO*** guarantee that the HTTP POST request, used to submit a form, will be routed to the same instance that served the initial page via an HTTP GET request. If the requests are handled by different instances, the antiforgery tokens aren’t synchronized, and an exception occurs. Sticky sessions via [ARR Affinity](/azure/app-service/manage-automatic-scaling?#how-does-arr-affinity-affect-automatic-scaling) routes user requests to the same node, however, ARR can reduce the scalability of a web farm.
19
+
* There’s ***NO*** guarantee that the HTTP POST request, used to submit a form, will be routed to the same instance that served the initial page via an HTTP GET request. If the requests are handled by different instances, the anti-forgery tokens aren’t synchronized, and an exception occurs. Sticky sessions via [ARR Affinity](/azure/app-service/manage-automatic-scaling?#how-does-arr-affinity-affect-automatic-scaling) routes user requests to the same node, however, ARR can reduce the scalability of a web farm.
20
20
21
21
The following distributed environments provide automatic key storage in a shared location:
22
22
23
23
*[Azure apps](/aspnet/core/security/data-protection/configuration/default-settings). For more information see <xref:security/data-protection/configuration/default-settings#key-management>.
24
24
* Newly created Azure Container Apps built using ASP.NET Core. For more information see [Autoscaling considerations
* Asp.net core apps hosted on multiple non-Azure VMs that don't use server affinity.
32
+
* Asp.net core apps hosted on multiple non-Azure VMs that don't use server affinity. Server affinity doesn't provide a shared location, it makes shared storage unnecessary. Server affinity ensures that a client's requests are always routed to the same server. For more information see [Server affinity](/azure/app-service/manage-automatic-scaling?#how-does-arr-affinity-affect-automatic-scaling).
0 commit comments