![mailessentials 90 day key mailessentials 90 day key](https://cdn.slidesharecdn.com/ss_thumbnails/d713e67d-c6f7-4d1b-89fb-2155bf13c71d-160315102629-thumbnail-4.jpg)
![mailessentials 90 day key mailessentials 90 day key](https://bloximages.chicago2.vip.townnews.com/fredericksburg.com/content/tncms/assets/v3/editorial/5/b3/5b32c5b4-c4c3-56c5-8755-bcbe4d7dfc40/5551237504db1.image.jpg)
If keys aren't stored in the user profile directory as expected:
MAILESSENTIALS 90 DAY KEY WINDOWS
In some scenarios (for example, Windows OS), setProfileEnvironment is set to false. The default value of setProfileEnvironment is true. The app pool's setProfileEnvironment attribute must also be enabled. If the operating system is Windows, the keys are encrypted at rest using DPAPI. If the user profile is available, keys are persisted to the %LOCALAPPDATA%\ASP.NET\DataProtection-Keys folder. If you desire slot-independent key rings, use an external key ring provider, such as Azure Blob Storage, Azure Key Vault, a SQL store, or Redis cache. This leads to users being logged out of an app that uses the standard ASP.NET Core cookie authentication, as it uses Data Protection to protect its cookies. When you swap between deployment slots, for example swapping Staging to Production or using A/B testing, any app using Data Protection won't be able to decrypt stored data using the key ring inside the previous slot. Separate deployment slots, such as Staging and Production, don't share a key ring.The DataProtection-Keys folder supplies the key ring to all instances of an app in a single deployment slot.This folder is backed by network storage and is synchronized across all machines hosting the app. If the app is hosted in Azure Apps, keys are persisted to the %HOME%\ASP.NET\DataProtection-Keys folder. The app attempts to detect its operational environment and handle key configuration on its own.