Skip to content

.NET 9 marks X509Certificate2 as obsolete (syslib0057) #34296

@Ramstah

Description

@Ramstah

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

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions