我有一个.net core 2.0
使用IdentityServer 4的应用程序。它在开发模式下完美运行。然后我将其发布为生产模式并进行了测试。当我单击一个(该操作具有生成accesstoken的方法)链接时,出现如下错误,
发生未处理的异常:格式错误的 URL
然后在生产(发布)模式下发生错误:
var disco = await IdentityModel.Client.DiscoveryClient.GetAsync(_configuration.GetSection("Settings").GetSection("DiscoveryClient").Value);
上面DiscoveryClient
不是
这里是错误的完整描述http
..https
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Malformed URL
System.InvalidOperationException: Malformed URL
at IdentityModel.Client.DiscoveryClient.ParseUrl(String input)
at IdentityModel.Client.DiscoveryClient..ctor(String authority, HttpMessageHandler innerHandler)
at IdentityModel.Client.DiscoveryClient.<GetAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
这是因为'https'。我不知道发生了什么。希望您对此有所帮助。