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

The last line ".ProtectKeysWithCertificate(cert);" returns error. However the tutorial here doesnt. I cant figure out why the method "ProtectKeysWithCertificate()" is returning. I will appreciate it very much if anybody out there could indulge me.

Thanks

Razvan Dumitru
  • 11,815
  • 5
  • 34
  • 54
Tee-Jay
  • 736
  • 2
  • 9
  • 28
  • As a follow-up. I use ASP.NET Core 1.1 for an application and the same ideas behind that tutorial. I wasn't able to find the .ProtectKeysWithCertificate() method anymore in Microsoft.AspNetCore.DataProtection Version=1.1.0.0. https://i.stack.imgur.com/9k2Wg.jpg – Razvan Dumitru Dec 09 '16 at 11:43

1 Answers1

1

Looks like ProtectKeysWithCertificate is not available in .NET Core. Here is Damien's discussion on Twitter: https://twitter.com/damien_bod/status/698975038142353408

Felix
  • 9,248
  • 10
  • 57
  • 89