Last post Jan 15, 2021 08:57 PM by bruce (sqlwork.com)
Jan 14, 2021 09:26 PM|Lit|LINK
(Copy pasted this from stack overflow, got no answer there.)
I just got started with Blazor, following [Microsoft's Guide,] but I need to allow outside access from http, so I can access it from ```<server-ip>:5000```, as I am running a linux VPS that I don't have GUI access to. Is there any way to do this? (When
creating my Blazor app, I left out the ```--no-https```) Sorry if this is a dumb question. [I looked it up on google] and found nothing helpful to me.
I get this:
[![This is the error]]
When I run ```dotnet run```
If you're wondering which version of Blazor I'm running (WASM or Server), I don't know. I'm just following Microsoft's guide.
Jan 14, 2021 10:41 PM|bruce (sqlwork.com)|LINK
Generally neither port 5000 or the ssl 5001 port are open to external browsers. You will need to open the firewall. See your Linux docs for this. Remove the httpsrediect option in startup if you don’t want ssl redirection forced.
Jan 15, 2021 01:30 AM|Lit|LINK
Can I change the port to something like 8080 or 8000?
Jan 15, 2021 03:40 PM|bruce (sqlwork.com)|LINK
Yes. You can set it in appsettings.json or the command line. It all depends on how you are launching the app.
Jan 15, 2021 05:48 PM|Lit|LINK
How would I do it from appsettings.json? I opened it in nano, and this is what I got. Nothing about the port:
thanks for helping me with my newbie questions
Jan 15, 2021 08:57 PM|bruce (sqlwork.com)|LINK