0

I am trying to run a blazor application that I have made, and I would like to publish for people who are not on my computer. I have changed the launchsettings.json to the following

 "commandName": "Project",
  "launchBrowser": true,
  "applicationUrl": "https://localhost:5001;http://localhost:5000;https://192.168.50.15:16000;",
  "environmentVariables": {
    "ASPNETCORE_ENVIRONMENT": "Development"
  }
}

As I understand it I should be able to connect to this web page on my phone on the same network. However, when I go to 192.168.50.15:16000 on my phone I get a ERR_EMPTY_RESPONSE in google chrome. What am I doing wrong?

Danger Zone
  • 149
  • 2
  • 11
  • Have you enabled incoming TCP-traffic to port 16000 in the firewall on the computer that hosts the app? – Johan Donne Feb 09 '21 at 05:59
  • Yep, both incoming and out going – Danger Zone Feb 09 '21 at 06:29
  • And what does https://192.168.50.15:16000 show on (the same | another) PC ? – H H Feb 09 '21 at 06:42
  • You didn't post the outer Json for this and did not specify how you run this, Did the Console window say `"Now listening on https://192.168.50.15:16000"` ? – H H Feb 09 '21 at 06:50
  • Did you use publish on your application? If so you should look at this https://stackoverflow.com/questions/37365277/how-to-specify-the-port-an-asp-net-core-application-is-hosted-on to make sure it is hosted on the correct port – olabacker Feb 09 '21 at 08:39
  • The console did output listening on https://192.168.50.15:16000 and the application is not published. On my pc where it is hosted it shows the blazor page. On all other devices it give ERR_RESPONSE_EMPTY – Danger Zone Feb 09 '21 at 19:11
  • I would expect problems with accepting the localhost certificate. Not sure if that could show up as RESPONSE_EMPTY. You may try `http://` (no `s`), just for luck. – H H Feb 12 '21 at 06:47
  • Yeah, on HTTPS it doesnt pull any response, and with HTTP it just returns a blank – Danger Zone Feb 15 '21 at 22:40

1 Answers1

0

After hosting my blazor application, my guess is it did have something to do with local host's certificate not being accepted. For anyone who is interested, this tutorial was a great help to do that.

Danger Zone
  • 149
  • 2
  • 11