Reputation: 138
I got compile time error on add of ProtectKeysWithCertificate this line
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddDataProtection()
.SetApplicationName("Testervice")
.ProtectKeysWithCertificate(newCert);
//compile time error on ProtectKeysWithCertificate line
//method not found
}
Upvotes: 2
Views: 537
Reputation: 42100
As indicated in the documentation, ProtectKeysWithCertificate()
is not available on .NET Core 1.0/1.1 (netcoreapp1.x
).
If you want to use it, you can target the full .NET Framework (e.g net461
).
Upvotes: 1