I Have a project in ASP.NET 5 using self-host.
PROJECT.JSON
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"gen": "Microsoft.Framework.CodeGeneration",
"ef": "EntityFramework.Commands"
},
It using the http://localhost:5000...
I want to know how can i acess the website from another PC, not using localhost. Like a IP with or without DNS.
Please, help me!
I was having the same issue trying to self host and only being able to access locally. I checked with Angry IP Scanner and saw that the port wasn't even open when the app was running so obviously that would prevent remote access.
Eventually I realised the --server.urls command must basically work like bindings in IIS, so where you have --server.urls http://localhost:5000, you just need to change localhost for your computer name or ip address (or add both) e.g. --server.urls http://mypc:5000.
This worked for me so I hope it does for you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With