Home > Software engineering >  System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String

Time:11-01

I have developed a project using identity server. I'm trying to query with a token I got from the identity server through an API. Two applications are running on the same pc. If I publish both the identity server and the api with the ip address, I get the following error when I make a request. How can I fix this error?

enter image description here

CodePudding user response:

You must always use a domain name when you use HTTPS, using HTTPS://xxx.xxx.xxx.xxx does not work.

You need to configure your endpoint to support HTTPS or try to use localhost.

CodePudding user response:

This error is emitted when the Microsoft authentication library can't download the openidconnect metadata document from the specified identity server instance. Looking down the stack trace it appears that the connection has been aborted at the SSL/TLS layer because the certificate presented was either invalid for the address requested or not recognised as coming from a valid signing authority. This might come about if you have configured your app startup to connect to IdentityServer by IP rather than by hostname, because the cert presented will be for the hostname localhost and contains no mention of the IP.

How are you publishing IdentityServer; is it running in your local IIS Express? If so it should be using the iis self-signed certificate which your own machine should recognise. You can try repairing the IIS express installation if the localhost certificate isn't present for some reason.

  • Related