我已经搜索过很久了,除非我谷歌搜索不正确,否则我似乎无法找到任何东西。我发现的最接近的是Need to debug my Web API service that's requested from a client machine - need help, how do I do this?
我正在我的Mac上创建一个iOS应用程序并运行一个Windows VM,其中我的C#WebAPI在localhost / IIS Express中运行。如何设置它以便我可以达到我的VS断点?
这似乎不起作用。我想我可能会遗漏一些东西。 https://codemilltech.com/code-mill-minute-debugging-with-visual-studio-but-not-from-windows/
我还尝试了一个名为Conveyor https://www.visualstudiogallery.msdn.microsoft.com/a429dbb7-a982-4541-b401-934375c02c0f
的Visual Studio扩展程序答案 0 :(得分:0)
好的,我偶然发现了另一个链接,看起来这种方式很有效。本文没有说的唯一内容是将您的IP添加到您的mac主机。我从上面的其他文章中得到了。
sudo nano / private / etc / hosts 10.211.55.5窗口
https://gist.github.com/justingarrick/6322779#file-iis_parallels_win8_mac-md
netsh http add urlacl url = http://windows:8080/ user = everyone
添加防火墙规则以管理员身份打开CMD或Powershell。为此新端口添加入站防火墙规则。在Windows 8中,语法为: netsh advfirewall防火墙添加规则名称=“IISExpressWeb”dir = in action = allow protocol = TCP localport = 8080
在Windows 7中,语法为: netsh防火墙添加portopening TCP 8080 IISExpressWeb启用所有
配置IIS绑定如果您正在使用IISExpress,请编辑applicationhost.config文件,该文件通常位于Documents \ IISExpress \ config \ applicationhost.config中。在网站下找到您的网站,并使用您的计算机名称添加绑定到该端口,例如
如果您使用的是IIS,请打开IIS管理器,在YourMachineName>下找到您的站点。网站> YourSiteName。右键单击并选择Edit Bindings ....添加一个绑定,其中包含您在步骤1中选择的主机名,例如,键入:http,IP地址:全部未分配,端口:8080,主机名:windows。单击“确定”。