- Run Visual Studio 2019 as Administrator
- Edit {ProjectRoot}/.vs/{WebProjectName}/config/applicationhost.config
- In the <sites> section, add a binding under the website project's <site> definition (see below):
- Allow the desired port through your firewall
<site name="FocusAndExecute" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="{path_to_site}" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:51427:localhost" />
<binding protocol="http" bindingInformation="*:51428:192.168.1.123" />
</bindings>
</site>
After doing this and launching IIS Express from Visual Studio, I was able to hit the site from the Mac by going to:
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="{path_to_site}" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:51427:localhost" />
<binding protocol="http" bindingInformation="*:51428:192.168.1.123" />
</bindings>
</site>
After doing this and launching IIS Express from Visual Studio, I was able to hit the site from the Mac by going to:
http://192.168.1.123:51428
NOTE: You may be able to put *:51428:* instead of specifying the IP, so you can hit it by host name, etc. but I didn't play with that yet. Feel free to leave a comment if you have a better way!
No comments:
Post a Comment