I am using Identity server 4. It was working fine in fact still, everything is working. However when I try to call
var client = new HttpClient();
// discover endpoints from metadata
var disco = client.GetDiscoveryDocumentAsync(IDPBaseURL).Result;
it gives me error
http://xxx.x.x.xx:8080/.well-known/openid-configuration: HTTPS required.
It's working from Visual studio and local IIS deployment. However i am facing this error only when deploying on the server.
any Idea?
I ran into this same issue and solved it by changing the policy on the discovery document request.
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync(new DiscoveryDocumentRequest {
Address = "http://xxx.xxx.x.xxx:xxxx",
Policy =
{
RequireHttps = false
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With