首页 > 解决方案 > 将 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"
    }
}

标签: c#

解决方案


有一个示例演练(适用于 Azure AppService、Windows 操作系统,而不是 Linux)在 github 上发布和部署(在 blazor 研讨会之一中),也许这会有所帮助。


推荐阅读