Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 08:14
    Sebastian
    0

    Unable to open BackOffice after new install

    This is my first try with Umbraco. I have installed the latest version on my local Windows machine according to the docs.

    When I start with dotnet run, I see a welcome page in the browser (on both ports shown in the command line). However, when I click on the Open Umbraco button, I get the following error message:

    error:invalid_request
    error_description:The specified 'redirect_uri' is not valid for this client application.
    error_uri:https://documentation.openiddict.com/errors/ID2043
    

    The URL looks like this:

    https://localhost:44334/umbraco/management/api/v1/security/back-office/authorize?redirect_uri=https%3A%2F%2Flocalhost%3A44334%2Fumbraco%2Foauth_complete&client_id=umbraco-back-office&response_type=code&state=Xf8P0V5V9Y&scope=offline_access&prompt=consent&access_type=offline&code_challenge=snXL3fsdYvHjla49dZlqV1p7H4uU3arHMK3lZj_pOWU&code_challenge_method=S256
    

    I suspect that this has to do with encrypting transport between the browser and Kestrell, but I am not sure.

    I have tried to switch this behavoir off by setting the runtime mode to developer in appsettings.json (docs), but that does not help.

    What causes this error and how can I fix it on my local Windows machine?

  • Sebastiaan Janssen 5057 posts 15514 karma points MVP admin hq
    Jun 06, 2024 @ 08:15
    Sebastiaan Janssen
    100

    I've seen this before and I can't put my finger on it yet, but a restart of the server seems to help.

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 08:26
    Sebastian
    0

    Note: I edited this response a couple of times (still learning)

    I just tried restarting a couple of times, but it didn't help. I still get the same error message.

    On the other port, I get another error message:

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

    I found this post on StackExchange that explains the error message. According to the post, a temporary (yet unsafe) fix could be to disable the transport security requirement in the builder.

    options.UseAspNetCore().DisableTransportSecurityRequirement();
    

    Is that possible with Umbraco? I saw that it uses CreateUmbracoBuilder, I'm not quite sure how to modify that. I'm not even sure this issue is related to Transport Security, but maybe it's worth a try.

  • Sebastiaan Janssen 5057 posts 15514 karma points MVP admin hq
    Jun 06, 2024 @ 09:11
    Sebastiaan Janssen
    0

    Yes it is possible but shouldn't be needed and it is dangerous as that might end up being deployed to a live server, lowering your security.

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 09:13
    Sebastian
    0

    Agree. I'm trying to find the place in the documentation that describes how to configure https correctly using the built in Kestrel-server. Any hints?

  • Sebastiaan Janssen 5057 posts 15514 karma points MVP admin hq
    Jun 06, 2024 @ 09:15
    Sebastiaan Janssen
    0

    No no, please don't fiddle with it. We've made sure that it should always work with a plain old default install of .net. No kestrel changes should ever be required.

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 11:10
    Sebastian
    0

    Ok, so I can just put it on a server and it should work out of the box? That sounds awesome! :-)

    On a server, would I have to provide a path to the SSL certificates though?

  • Sebastiaan Janssen 5057 posts 15514 karma points MVP admin hq
    Jun 06, 2024 @ 12:09
    Sebastiaan Janssen
    0

    You can put it on the server out of the box!

    Something like dotnet publish -c Release -o .\release should give you everything you need to put on a server (-c is for the buid configuration, you're building in Release mode, -o is for the output directory).

    There are a million ways to deploy to a server, so that's up to you and yes, a proper TLS config is a good idea. But this part is mostly up to you, it is "just" a .NET web application, so you can research how to deploy a regular .NET web app.

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 12:41
    Sebastian
    0

    Thanks, will do!

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 09:04
    Sebastian
    0

    Ok, so I got this running again after a couple of restarts as Sebastiaan suggested. I had to erase the browser cache a couple of times.

    Upon testing, it seems as if this behavior is caused by using the port for https requests.

  • Sebastiaan Janssen 5057 posts 15514 karma points MVP admin hq
    Jun 06, 2024 @ 09:13
    Sebastiaan Janssen
    0

    It's weird maybe the combo of clearing cache and restarting the server did the trick. I wonder if it might be because you've ran a v13 site on the same port and the cookies are slightly different?

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 11:13
    Sebastian
    0

    Not sure, if I understand (first time Umbraco user). But I checked, and it says version 14.0.0. This was my very first Umbraco install ever.

  • Sebastiaan Janssen 5057 posts 15514 karma points MVP admin hq
    Jun 06, 2024 @ 12:10
    Sebastiaan Janssen
    1

    Aah okay, cool, welcome on board!

    I did respond to this thread in particular because I've seen it happen to me too and I really couldn't quite figure out what I had "done wrong" - so I'm trying to find clues, to figure out what might cause this problem and how we can prevent it from happening to other people (or at least have documentation, if we can't prevent it).

  • Sebastian 8 posts 88 karma points
    Jun 06, 2024 @ 12:38
    Sebastian
    0

    Ok. Let me know if can help. You just have to give me newbie instructions. :-)

    ... btw, I have been playing with Umbraco for a couple of hours now and I am starting to regret that we chose Wordpress to run our website when we made that decision a couple of years ago. It's a really great tool!

Please Sign in or register to post replies

Write your reply to:

Draft