How to change URL of a Blazor server app that hosted as a windows service

275 Views Asked by At

I've a Blazor server app that is installed as windows service and runs fine. The default application URL is "http://localhost:5000" and I want to configure it so that it could be rechable from outside the server, also I need to configure it for a universal URL for example "http://example.com/myapp". How can I do it?

1

There are 1 best solutions below

0
Mister Magoo On BEST ANSWER

I do this in my appsettings.json

    "Kestrel": {
        "Endpoints": {
            "HttpsInlineCertFile": {
                "Url": "https://myserver:port",
                "Certificate": {
                    "Path": "path_to_my.pfx",
                    "Password": "_cert_password_"
                }
            }
        }
    }