0

I've searched this for far to long and I can't seem to find anything unless I am googling it incorrectly. The closest thing I've found is this Need to debug my Web API service that's requested from a client machine - need help, how do I do this?

I am making an iOS app on my mac and running a windows VM that has my C# WebAPI running in localhost/IIS Express. How can I set it up so I can hit my VS break points?

This didn't seem to work. I think I may be missing something. https://codemilltech.com/code-mill-minute-debugging-with-visual-studio-but-not-from-windows/

I've also tried this Visual Studio extension called Conveyor https://www.visualstudiogallery.msdn.microsoft.com/a429dbb7-a982-4541-b401-934375c02c0f

Community
  • 1
  • 1
Misha
  • 128
  • 1
  • 12
  • I really could use some pointers. I found this https://dontpaniclabs.com/blog/post/2015/08/25/browser-debugging-between-os-x-and-visual-studio-in-parallels/ but that didn't work either. – Misha May 10 '17 at 14:09

1 Answers1

0

Ok I stumbled upon another link and it looks like this way works. The only thing that this article didn't say is to add your IP to your mac host. Which I got from the other articles above.

sudo nano /private/etc/hosts 10.211.55.5 windows

https://gist.github.com/justingarrick/6322779#file-iis_parallels_win8_mac-md

Expose IIS or IISExpress running in a Parallels Windows 7/8 VM to your OS X host

Rename your virtual machine In your Windows 7/8 VM, go to Control Panel > System > Advanced system settings > Computer Name and click Change. Name this whatever you like, e.g. windows. Restart your VM. Add an ACL rule Open CMD or Powershell as administrator. Add a URL ACL entry for your new name on the port of your choice, e.g.

netsh http add urlacl url=http://windows:8080/ user=everyone

Add a firewall rule Open CMD or Powershell as administrator. Add an inbound firewall rule for this new port.

In Windows 8, the syntax is: netsh advfirewall firewall add rule name="IISExpressWeb" dir=in action=allow protocol=TCP localport=8080

In Windows 7, the syntax is: netsh firewall add portopening TCP 8080 IISExpressWeb enable ALL

Configure the IIS binding If you're using IISExpress, edit your applicationhost.config file, typically found at your Documents\IISExpress\config\applicationhost.config. Find your site under sites, and add a binding to the port using your machine name, e.g.


If you're using IIS, open IIS Manager, find your site under YourMachineName > Sites > YourSiteName. Right-click and select Edit Bindings.... Add a binding with the host name you selected in step 1, e.g. Type: http, IP address: All Unassigned, Port: 8080, Host name: windows. Click OK.

Restart IIS/IISExpress Startup IISExpress with Visual Studio or restart IIS from IIS Manager and hit your URL from a browser on your Mac/VM Host, e.g. http://windows:8080 Sources IIS Express enable external request IISExpress returns a 503 error from remote machines http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx
Misha
  • 128
  • 1
  • 12