Parallels (Windows) - Expose ASP.NET Web API ports to OSX

4 years ago

These steps are used to expose ASP.NET Web API ports to OSX from Windows using on Parallels.

  • Open Windows in Parallels.
  • Get the ASP.NET Web API port number by right-clicking on the project and clicking Properties, clicking on the Web tab and looking at the Project Url.
  • Open the command prompt and get your IPv4 Address by typing ipconfig.
  • Within the command prompt, type the following:
netsh http add urlacl url=http://*:[Web API port number]/ user=everyone

More Information: https://docs.microsoft.com/en-us/windows/desktop/http/add-urlacl

  • Add bindings to .vs/config/applicationhost.config. This may be in your .NET solution root folder and may be hidden.
 <bindings>
   <binding protocol="http" bindingInformation=“*:[Web API port number]:localhost" />
   <binding protocol="http" bindingInformation="*:[Web API port number]:[IPv4 Address]“ />
</bindings>
Discuss on Twitter