-
Notifications
You must be signed in to change notification settings - Fork 4k
IDX20803: Unable to obtain configuration from: 'https://[publicIP]/.well-known/openid-configuration'. #3039
Comments
I have a feeling it's a HTTPS issue, and completely unrelated to IdentityServer. |
Everything is working fine on local environment, but in production server I am trying to get the certificate with X509 to AddSigingingCredential method. We have generated this with Let's Encrypt. I am not sure but do we have any way wherein we can ignore certificate and use any other way to sign the token key. |
Sounds like a failure to complete the HTTPS/TLS-handshake. Its not an IdentityServer-issue in that case, but an issue with how the HTTP-request between client and server is setup. Perhaps you're missing a client certificate on the HTTP-request from your client-app? Enable network-tracing in your client-app and you'll find the answer in the verbose socket-logs that are generated when the GET-request fails. |
{ |
Still trying to resolve it, now it is giving above issue. I am also using public certificate now |
«System.Net.Sockets.SocketException: No such host is known» means the hostname cannot be reached, i.e. the client code can’t open a socket to the IP you’re using. Can you open the url in a browser? If it’s a public IP then that should work, otherwise it’s due to network or maybe a wrong IP. |
Thanks Henrik, yes I can access everything in browser, even this discovery document. Everything is working fine on dev machine and in on Intranet staging environment. But I am still not understanding what is stopping... every port is open also..., Not able to find out the reason. |
Thanks, now everything is working fine, issue was that machine internal IP was not mapped with DNS name. Machine was not able to open the port because it was not understanding which IP need to be call. An entry of mapping done in "hosts" file. Please close the issue. |
Closed |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am facing the same issue, environment is deployed in IIS in 3 different site
-Angular App
-IdentityServer4
-WebAPI - ASP.Net Core 2.1
and working fine on localhost and in Intranet, but when I am exposing it to Internet then it is giving the following issue.
{
"Code": 123,
"HttpCode": 500,
"Message": "Error",
"Description": "IDX20803: Unable to obtain configuration from: 'https://[publicIP]/.well-known/openid-configuration'.
inner exception : System.IO.IOException: IDX20804: Unable to retrieve document from: 'https://[publicIP]/.well-known/openid-configuration'. ---> System.Net.Http.HttpRequestException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond\r\n at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\r\n --- End of inner exception stack trace ---\r\n at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\r\n at System.Threading.Tasks.ValueTask
1.get_Result()\r\n at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Threading.Tasks.ValueTask
1.get_Result()\r\n at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask1 creationTask)\r\n at System.Threading.Tasks.ValueTask
1.get_Result()\r\n at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\r\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\r\n at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)\r\n --- End of inner exception stack trace ---\r\n at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)\r\n at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel)\r\n at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.GetConfigurationAsync(CancellationToken cancel)stack trace : at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.GetConfigurationAsync(CancellationToken cancel)\r\n at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()\r\n at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()\r\n at Microsoft.AspNetCore.Authentication.AuthenticationHandler
1.AuthenticateAsync()\r\n at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)\r\n at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()\r\n at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()\r\n at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)\r\n at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIIndexMiddleware.Invoke(HttpContext httpContext)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext)\r\n at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)"}
The text was updated successfully, but these errors were encountered: