Reputation: 31
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)
dotnet new mvc
dotnet publish -c release
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.
Upvotes: 1
Views: 1349
Reputation: 3050
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
Upvotes: 1