When the client sends a connection request to identityserver4, an error is reported: HTTPS required
Error connecting to http://192.168.20.6:5601/.well-known/openid-configuration: HTTPS required
Since the identity server 4 project does not enable HTTPS, the client does not write it well
It was written like this at the beginning, using WinForm
string AuthorityAddress = ConfigurationManager.AppSettings["AuthorityAddress"];
var client = new HttpClient() ;
var disco = await client.GetDiscoveryDocumentAsync(AuthorityAddress);
if (disco.IsError)
{
LogHelper.LogError(disco.Error);
return false;
}
report errors
Later, you can set the request policy through discoverydocument request
string AuthorityAddress = ConfigurationManager.AppSettings["AuthorityAddress"];
var client = new HttpClient() ;
// var disco = await client.GetDiscoveryDocumentAsync(AuthorityAddress);
var config = new DiscoveryDocumentRequest() { Address = AuthorityAddress, Policy = new DiscoveryPolicy() { RequireHttps = false } };
var disco = await client.GetDiscoveryDocumentAsync(config);
if (disco.IsError)
{
LogHelper.LogError(disco.Error);
return false;
}
In our development environment, sometimes we don’t care whether it’s HTTP or HTTPS. When we deploy, we find that there are many problems.
You need to issue a certificate to deploy HTTPS. If you use intranet, just deploy HTTP directly
Read More:
- How to Solve Maven Error: Return code is: 501 , ReasonPhrase:HTTPS Required.
- [Solved] Elasticsearch Error: received plaintext http traffic on an https channel, closing connection…
- [Solved] Android HTTPS request resource or interface error: server certificate
- How to Fix NSS error 12190 in curl accessing to HTTPS
- Analysis of npm error ENOTFOUND npm ERR! network request to https://npm.***.com/*** failed and the role of the .npmrc file
- [Solved] Arcgis Error: The number of points is less than required for feature
- ERROR ITMS-90022: “Missing required icon file. [How to Solve]
- [Solved] ffmpeg Enable https Error: “ERROR: openssl not found”
- [Solved] Redis executes the monitor command error: noauth authentication required
- [Solved] MindSpore Error: “TypeError: parse() missing 1 required positional.”
- [Solved] go cobra Error: required flag(s) “pkg-name” not set
- How to Fix “Microsoft Visual C ++ 14.0 is required” Error
- [Solved] Manifest merger failed: Apps targeting Android 12 and higher are required to specify an explicit
- Solution to java.lang.IllegalArgumentException: Property’dataSource’ is required
- [Solved] fastapi error: {“detail”:[{“loc”:[“body”],”msg”:”field required”,”type”:”value_error.missing”}]}
- [Solved] error: failed to push some refs to ‘https://gitee.com/wangdxstudy/mygirl.git‘
- [Solved] Windows Android Studio Cannot Start Error: Internal error. Please refer to https://code.google.com/p/android/issue
- The pip installation package under Windows reports an error: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
- Redis use command access exception: (error) noauth authentication required
- ElementUI Error in callback for watcher “data”: “Error: [ElTable] prop row-key is required”