This server only accepts HTTPS requests ID2083

error:invalid_request
error_description:This server only accepts HTTPS requests.
error_uri:https://documentation.openiddict.com/errors/ID2083

I’ve tried pretty much all the suggested solutions on the web and I still get this error.

I can get rid of this error by starting a fresh install of Umbraco15 on the server (SmarterASP.net).

As soon as I start publishing my website to SmarterASP.net either by FTP or WebDeploy. I get this error when accessing the backend. I get the error on both Google browser on Windows and android.

Thanks!

I was able to fix this issue by modifying the appsettings.json and adding these lines:

  "WebRouting": {
    "UmbracoApplicationUrl": "https://localhost:44341/"
  }

I was having this issue on loadbalanced environment where the SSL termintaion happened on the reverse proxy.
I had to disable UseHttps

{
    "Umbraco": {
        "CMS": {
            "Global": {
                "UseHttps": false
            }
        }
    }
}

This information is missing in the Umbraco Docs about HTTPS in Running in Docker

Hey there :slightly_smiling_face:

I just quickly wanna chime in here about disabling HTTPS.
It should not really be necessary if you configure your application with the correct handling of forwarded headers.

Umbraco can work just fine behind a loadbalancer and still have all the best practice security settings enabled.

Here’s an example:

// Umbraco 17+ / .NET 10+
// Program.cs

var builder = WebApplication.CreateBuilder(args);

// Forward headers needed to pass information from the reverse proxy to the application
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
    options.ForwardedHeaders =
        ForwardedHeaders.XForwardedFor |
        ForwardedHeaders.XForwardedProto |
        ForwardedHeaders.XForwardedHost;

    var address = System.Net.IPAddress.Parse(127.0.0.1);
    var ipNetwork = new System.Net.IPNetwork(address, 32);
    options.KnownIPNetworks.Add(ipNetwork);
});

builder.CreateUmbracoBuilder()
    .AddBackOffice()
    .AddWebsite()
    .AddComposers()
    .Build();


var app = builder.Build();

await app.BootUmbracoAsync();

// This is needed to forward the headers from the reverse proxy to the application
app.UseForwardedHeaders();

app.UseUmbraco()
    .WithMiddleware(u =>
    {
        u.UseBackOffice();
        u.UseWebsite();
    })
    .WithEndpoints(u =>
    {
        u.UseBackOfficeEndpoints();
        u.UseWebsiteEndpoints();
    });

For Umbraco version lower then 17 and .NET 9 and down you have to alter then implementation just a bit:

// 17 up
    var address = System.Net.IPAddress.Parse(127.0.0.1);
    var ipNetwork = new System.Net.IPNetwork(address, 32);
    options.KnownIPNetworks.Add(ipNetwork);

// Below 17
    var address = System.Net.IPAddress.Parse(127.0.0.1);
    var ipNetwork = new IPNetwork(address, 32);
    options.KnownNetworks.Add(ipNetwork);

More info on the Microsoft docs:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-10.0