1

I badly need your help because I'm trying to create a dummy app for my project on ubuntu server but everytime I run the published .dll file I cant access it on my client pc.

Here's what ive done on my host (VM ubuntu server)

  • download dotnet-sdk-2.1
  • dotnet new mvc
  • dotnet publish -c release
  • copied the published files on /var/www/firstapp

dotnet firstapp.dll gives output:

Hosting environment: Production
Content root path: /home/ubuntu/testapp/netcore/publish
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.*

I tried to access it on browsers with http://192.168.56.103:5000 (server's ip) but still cannot access.

I have tried to open the port 80, 5000, 50001 it still not connecting. I also tried to disable the firewall. Thank you guys.

JLe
  • 2,835
  • 3
  • 17
  • 30

1 Answers1

1

please refer to Why does aspnet core start on port 80 from within Docker?

you can use environment variable to change the listening ip and port, then run your app:

export ASPNETCORE_URLS=http://+:5000
dotnet firstapp.dll
zhimin
  • 2,740
  • 12
  • 22
  • 1
    i did but nothing happens. btw, i did try to install Links in my server then browse http://localhost:5000 my sample web starts running, but every time i try to browse the public IP which is http://192.168.56.103:5000 i encountering bad server – Michael Eduard Guivencan Dec 03 '18 at 10:07
  • what is the console output after you export the environment var? – zhimin Dec 03 '18 at 10:40
  • I have the same issue and is not running in a vm. Ubuntu installation. – bortronx Jul 25 '22 at 20:57