c# - 将 ID 为 4 的 asp.net 核心部署到 Azure
问题描述
请帮我解决这个问题,我正在尝试将包含 IdentityServer4 的应用程序部署到带有子域 (mysite.azurewebsites.net) 的 Azure,但出现此异常:
未处理的异常。System.InvalidOperationException:在 Microsoft.AspNetCore.ApiAuthorization.IdentityServer.SigningKeysLoader.LoadFromStoreCert(字符串主题,字符串 storeName,StoreLocation storeLocation 的“CurrentUser\My”上找不到主题为“CN = altsourceaure.azurewebsites.net”的有效证书, DateTimeOffset currentTime) 在 Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ConfigureSigningCredentials.LoadKey() 在 Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ConfigureSigningCredentials.Configure(ApiAuthorizationOptions 选项)
这是我在 Prd 上的配置:
"IdentityServer": {
"Key": {
"Type": "Store",
"StoreName": "My",
"StoreLocation": "CurrentUser",
"Name": "CN=mySite.azurewebsites.net"
}
}
解决方案
有一个示例演练(适用于 Azure AppService、Windows 操作系统,而不是 Linux)在 github 上发布和部署(在 blazor 研讨会之一中),也许这会有所帮助。
推荐阅读
- c# - Entity Framework Core:没有外键的单向导航属性
- javascript - 在父级内部使用 translateX 不断移动对象,我的计算有什么问题?
- flutter - 当我使用 ScrollController 侦听器时颤动锁定一秒 ui
- ruby-on-rails - 如何在 rails_admin 的嵌套字段中自定义输入字段的操作?
- azure - 将自定义数据传递给 azure vmss 的操作系统选项 - Terraform
- python - 有没有办法在 Python 中管理大量导入语句?
- python-3.x - Python按浮点值排序字典列表
- c++ - 如何设置 .vcxproj 让 MSBuild 编译一个 dll
- php - PHP 致命错误:无法声明类 CreateUsersTable,因为该名称已在使用中
- seaborn - 在使用 Seaborn Distplot 时了解 bin 和相关分布