[英]How to allow remote access to Visual Studio 2013 web debug
I am developing a Web API project in ASP.Net using Visual Studio 2013. 我正在使用Visual Studio 2013在ASP.Net中开发Web API项目。
When I click debug it launches the website in IIS and displays it in Chrome browser. 当我单击debug时,它将在IIS中启动网站并在Chrome浏览器中显示它。 However, I cannot access it from another device.
但是,我无法从其他设备访问它。
I need to access the API from my mobile device for testing purposes. 我需要从移动设备访问API进行测试。 How can I perform remote debugging in Visual studio 2013?
如何在Visual Studio 2013中执行远程调试?
Your device is running under AVD emulator ? 您的设备正在AVD模拟器下运行?
I suggest follow this steps: 我建议按照以下步骤操作:
From Handling url binding failures in IIS Express : 从处理IIS Express中的URL绑定失败 :
To enable your website to serve external traffic, you need to configure HTTP.sys and your computer's firewall. 为了使您的网站能够提供外部流量,您需要配置HTTP.sys和计算机的防火墙。 From an elevated command prompt, run the following command:
在提升的命令提示符下,运行以下命令:
netsh http add urlacl url=http://myhostname:8080/ user=everyone
After configuring HTTP.sys, you can configure IIS Express to use port 8080 by using WebMatrix or Visual Studio 2010 SP1 Beta+, or by editing the applicationhost.config file to include the following binding in the sites element. 配置HTTP.sys之后,可以通过使用WebMatrix或Visual Studio 2010 SP1 Beta +,或通过编辑applicationhost.config文件以将以下绑定包含在sites元素中,来将IIS Express配置为使用端口8080。 (Replace myhostname with your computer's domain name).
(将myhostname替换为计算机的域名)。
<binding protocol="http" bindingInformation="*:8080:myhostname"/>
You will also need to configure the firewall to allow external traffic to flow through port 8080. 您还需要配置防火墙,以允许外部流量通过端口8080流动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.