简体   繁体   中英

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.

When I click debug it launches the website in IIS and displays it in Chrome browser. However, I cannot access it from another device.

I need to access the API from my mobile device for testing purposes. How can I perform remote debugging in Visual studio 2013?

there were few posts concerning this topic here ( one , two ). I faced the same problem recently and the most sufficent post I found was this one .

Your device is running under AVD emulator ?
I suggest follow this steps:

  1. Install IIS
  2. Configure Visual Studio to use local IIS (Page properties in your Web Project)
  3. Create a exclusive AppPool in IIS to work with your application
  4. In my Project I'm using Oracle Client and must be 32bits (64 bits don't works with Visual Studio) then I need allow 32 bit in Application Pool
  5. Configure the Windows firewall to allow request in port 80 (inbound rules)
  6. In your device use the intranet IP DON'T USE LOCALHOST OR 127.0.0.1, because some emulators works under another IP

From Handling url binding failures in IIS Express :

Serving External Traffic

To enable your website to serve external traffic, you need to configure HTTP.sys and your computer's firewall. 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. (Replace myhostname with your computer's domain name).

<binding protocol="http" bindingInformation="*:8080:myhostname"/> 

You will also need to configure the firewall to allow external traffic to flow through port 8080.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM