.NET 9 marks X509Certificate2 as obsolete (syslib0057) #34296
Labels
aspnet-core/svc
security/subsvc
Source - Docs.ms
Docs Customer feedback via GitHub Issue
⌚ Not Triaged
Description
Documentation examples for .NET 9 include obsolete usage as per syslib0057.
Example:
builder.Services.AddDataProtection()
.PersistKeysToFileSystem(new DirectoryInfo(@"\server\share\directory"))
.ProtectKeysWithCertificate(
new X509Certificate2("certificate.pfx", builder.Configuration["CertificatePassword"]));
Page URL
https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-9.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/data-protection/configuration/overview.md
Document ID
69818122-e47a-3fed-ea37-8009f66e2a5c
Article author
@tdykstra
Related Issues
The text was updated successfully, but these errors were encountered: