HTTPS Error 500

Product: PowerShell Universal
PowerShell Universal 4.1.2 Latest
Server 2022 standard 
Fresh Installation using the msi

The issue :
Using https and IP address i am getting certificate error that i can approve and then the site is working ok.

Using https and server URL ( i am getting the following Error :
"This page isn’t working is currently unable to handle this request.

This is the appsettings.json

“Kestrel”: {
“Endpoints”: {
“HTTP”: {
“Url”: “http://:80"
“Https”: {
“Url”: "https://
“Certificate”: {
“Path”: “C:\ProgramData\PowerShellUniversal\Cert\cert.pfx”,
“Password”: “XXXX”,
“AllowInvalid”: “true”
“RedirectToHttps”: “true”
“ApplicationInsights”: {
“InstrumentationKey”: “”
“AllowedHosts”: “*”,
“CorsHosts”: “”,
“Plugins”: [

How can I make it work ?

I’d recommend looking in the system log. It will have more information on the error you are seeing. You can download system logs by visiting Platform \ Logging.

in the system log i have this
2023-10-03 14:04:24.419 +03:00 [DBG] Connection id “0HMU3S5IK2775” received FIN.
2023-10-03 14:04:24.420 +03:00 [DBG] Connection id “0HMU3S5IK2775” accepted.
2023-10-03 14:04:24.420 +03:00 [DBG] Connection id “0HMU3S5IK2775” started.
2023-10-03 14:04:24.420 +03:00 [DBG] Failed to authenticate HTTPS connection.
System.IO.IOException: Received an unexpected EOF or 0 bytes from the transport stream.
at System.Net.Security.SslStream.ReceiveBlobAsync[TIOAdapter](CancellationToken cancellationToken)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte reAuthenticationData, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Https.Internal.HttpsConnectionMiddleware.OnConnectionAsync(ConnectionContext context)
2023-10-03 14:04:24.420 +03:00 [DBG] Connection id “0HMU3S5IK2775” stopped.
2023-10-03 14:04:24.420 +03:00 [DBG] Connection id “0HMU3S5IK2775” sending FIN because: “The Socket transport’s send loop completed gracefully.”

i did changes that i found on google and it didn’t solved the problem

i fond that the error is happening only when the appsettings.json is with
“Authentication”: {
“Windows”: {
“Enabled”: “true”


I found the problem
the solution is the following command
setspn -S HTTP/ user