3
services.AddDataProtection()
 .SetApplicationName("Report Book Resource Server")
 .PersistKeysToFileSystem(new DirectoryInfo(folderForKeyStore))
.ProtectKeysWithCertificate(cert);

最后一行“.ProtectKeysWithCertificate(cert);” 返回错误。但是这里的教程没有。我无法弄清楚为什么“ProtectKeysWithCertificate()”方法正在返回。如果有人可以放纵我,我将非常感激。

谢谢

4

1 回答 1

1

看起来 ProtectKeysWithCertificate 在 .NET Core 中不可用。这是 Damien 在 Twitter 上的讨论:https ://twitter.com/damien_bod/status/698975038142353408

于 2017-06-09T22:50:54.993 回答