【发布时间】:2020-02-25 20:07:55
【问题描述】:
这导致了 Startup.cs 中的问题:
services.AddIdentityServer() .AddDeveloperSigningCredential()
我尝试手动插入 tempkey.rsa 文件夹,但无法解决问题。
请告诉我如何处理这个问题?
FileNotFoundException: 找不到文件 'D:\home\site\wwwroot\tempkey.rsa'。 System.IO.FileStream.OpenHandle(FileMode 模式,FileShare 共享, FileOptions 选项)
FileNotFoundException: Could not find file 'D:\home\site\wwwroot\tempkey.rsa'.System.IO.FileStream.OpenHandle(FileMode 模式, FileShare 共享, FileOptions 选项)System.IO.FileStream..ctor(字符串路径,FileMode 模式、FileAccess 访问、FileShare 共享、int bufferSize、FileOptions 选项)System.IO.StreamWriter..ctor(字符串路径,布尔追加, 编码编码,int bufferSize) System.IO.StreamWriter..ctor(string 路径)System.IO.File.WriteAllText(字符串路径,字符串内容) Microsoft.Extensions.DependencyInjection.IdentityServerBuilderExtensionsCrypto.AddDeveloperSigningCredential(IIdentityServerBuilder builder, bool persistKey, 字符串文件名) IdentityServer.Startup.ConfigureServices(IServiceCollection 服务) 在 Startup.cs System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection 服务) Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices() Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
【问题讨论】:
-
发布您的应用程序后会发生这种情况吗?
-
你是怎么解决这个问题的?
标签: azure .net-core identityserver4