pro*_*011 3 c# cryptography data-protection asp.net-core
我Microsoft.AspNetCore.DataProtection在 ASP.NET Core 2.0 应用程序中使用数据保护。对于默认设置,我在Startup.cs文件中添加了以下代码
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddDataProtection().ProtectKeysWithDpapi();
...
...
}
Run Code Online (Sandbox Code Playgroud)
但该代码引发错误:
InvalidOperationException: 找不到“IXmlRepository”实例。设置“IXmlEncryptor”实例时,还必须设置相应的“IXmlRepository”实例。
我在这个实现中遗漏了什么吗?
| 归档时间: |
|
| 查看次数: |
2439 次 |
| 最近记录: |