I am running a WCF service thru Visual Studio (2015) and IIS Express.
I can navigate to http://localhost:50122/TestService.svc
What I want to do instead is navigate to http://machine-name:50122/TestService.svc
How do I configure IIS Express to accept machine-name, instead of localhost?
What I tried without success:
In Visual studio Project / Properties / Web /
try to change Project Url
to
http://machine-name:50122/ but VS prevents this !
In the visual studio solution folder there is a hidden .vs\config
folder. Within it, there is a file: applicationhost.config; I added another binding (second line) with machine-name
<bindings> <binding protocol="http" bindingInformation="*:50122:localhost" /> <binding protocol="http" bindingInformation="*:50122:intel-nuc" /> </bindings>
Found this on stackoverflow: How to enable external request in IIS Express? , which also applies to "internal" request.
The command I used (Run as Admin)
netsh http add urlacl url=http://intel-nuc:50122/ user=everyone
Afterwards, you also need to run VS as Admin.