Skip to main content

Support for storing data protection keys in Redis. This package was built from the source code at https://github.com/dotnet/dotnet/tree/297acf930fb0f5c07fd4e51d78e521b4ad2e5d1f

Total Downloads
78.6M
78,620,378
Published
Nov 10, 2026
12d ago

Get Started

dotnet add package Microsoft.AspNetCore.DataProtection.StackExchangeRedis --version 11.0.0
ProductVersions
.NET
net11.0
.NET Standard
netstandard2.0
Other
.NETFramework4.6.2

README

About

Microsoft.AspNetCore.DataProtection.StackExchangeRedis allows storing data protection keys in a Redis cache.

Only Redis versions supporting Redis Data Persistence should be used to store keys. Azure Blob storage is persistent and can be used to store keys. For more information, see this GitHub issue.

How to Use

To use Microsoft.AspNetCore.DataProtection.StackExchangeRedis, follow these steps:

Installation

dotnet add package Microsoft.AspNetCore.DataProtection.StackExchangeRedis

Configuration

To configure data protection key storage on Redis, call one of the PersistKeysToStackExchangeRedis overloads:

var redis = ConnectionMultiplexer.Connect("<URI>");
builder.Services.AddDataProtection()
    .PersistKeysToStackExchangeRedis(redis, "DataProtection-Keys");

Additional Documentation

For additional documentation and examples, refer to the official documentation on the Redis key storage provider.

Feedback & Contributing

Microsoft.AspNetCore.DataProtection.StackExchangeRedis is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.