IdentityServer4.Admin icon indicating copy to clipboard operation
IdentityServer4.Admin copied to clipboard

The SSL connection could not be established, see inner exception.

Open FatuityCookie opened this issue 5 years ago • 5 comments

Question

When I deployed Admin to iis, Admin didn't work properly ,Sts and Admin.Api is can run .What should I do?

Relevant parts of the log file

2021-09-08 15:55:10.698 +08:00 [ERR] Connection ID "16068843484953444874", Request ID "8000020b-0003-df00-b63f-84710c7967bb": An unhandled exception was thrown by the application.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
   at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at NWebsec.AspNetCore.Middleware.Middleware.CspMiddleware.Invoke(HttpContext context)
   at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context)
   at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context)
   at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context)
   at NWebsec.AspNetCore.Middleware.Middleware.MiddlewareBase.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()

FatuityCookie avatar Sep 08 '21 08:09 FatuityCookie

I'm having the same issue. Any way to fix this?

EDIT: In my case, there was a folder named 'cacerts.crt' in my /shared/nginx/certs, and de CAroot crt was incorrectly copied inside this folder. Deleting this folder and running the 'copy' command again fixed it for me.

Lootvoet avatar Oct 07 '21 09:10 Lootvoet

@Lootvoet - thanks for your feedback.

skoruba avatar Oct 08 '21 06:10 skoruba

I have the same error, but it's running in docker, I'm running this one only port 80

afranioce avatar Oct 12 '21 14:10 afranioce

@afranioce - please check this one: https://github.com/skoruba/IdentityServer4.Admin#certificates

skoruba avatar Oct 17 '21 07:10 skoruba

how can I debbug the Admin project in visual studio or vs code ?I don't know how to debug it,i hava the Cert . it is created by the mkcert ; mkcert -pkcs12 localhost 127.0.0.7 ::1 ,mkcert -pkcs12 skoruba.local.pfx skoruba.local *.skoruba.local . and I edit the host file (window),but it now work

JosonJiang avatar Mar 09 '22 02:03 JosonJiang