Visual Studio IISExpress

Setting up IISExpress to test API locally.

LAN access

Documentation https://docs.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-http

Elevated prompt

netsh http add urlacl url=http://ipadress:port/ user=everyone
netsh http add urlacl url=http://hostname:port/ user=everyone
netsh http add urlacl url=http://hostname.domain.tld:port/ user=everyone

Edit IIS applicationhost.config for project

SolutionName\.vs\sln\config\applicationhost.config

<site name="siteName" id="6">
 <application path="/" applicationPool="Clr4IntegratedAppPool">
   <virtualDirectory path="/" physicalPath="physicalPath" />
 </application>
 <bindings>
   <binding protocol="http" bindingInformation="*:port:localhost" />
   <binding protocol="https" bindingInformation="*:port:localhost" />
   <binding protocol="http" bindingInformation="*:port:hostname" />
   <binding protocol="https" bindingInformation="*:port:hostname" />
   <binding protocol="http" bindingInformation="*:port:hostname.domain.tld" />
   <binding protocol="https" bindingInformation="*:port:hostname.domain.tld" />
   <binding protocol="http" bindingInformation="*:port:ip" />
   <binding protocol="https" bindingInformation="*:port:ip" />
 </bindings>
</site>