asp.net core 部署 提示DataProtectionServices 错误

  今天在部署asp.net core网站时,因为调用到阿里云的api,api的参数需要加密签名,系统报出了如下错误:  

warn: Microsoft.Extensions.DependencyInjection.DataProtectionServices[59]
Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
warn: Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository[50]
Using an in-memory repository. Keys will not be persisted to storage.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]

上网搜了下应该是某些安全机制引起的吧。

具体请自行查看一下文章:Asp.net core Data Protection : https://docs.asp.net/en/latest/hosting/dataprotection.html

            github: https://github.com/aspnet/DataProtection/issues/102

反正我是大致看了下这两篇文章后找到解决方案的,但是详细原因嘛,英文还不过关。

使用 PowerShell执行第一篇文章提供的脚本。注意,Powershell 有可能会提示“此系统中禁止执行脚本”,那么按照提示先执行“se

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值