2 devices connected to the same address via Wireless

-2

I'm using Visual Studio 2017 to run application. (ASP.NET MVC)

How can I make another computer connect to the same url address: 192.XXXXXXXXXXX:56987 .

That is: 2 computers working at the same address, where I can debug computer A and B.

I have 2 computers connected to the same wifi network.

1 - Attempt:

I've been in the Windows firewall setup > I added new rule ... (New port configured).

And I still get the following error:

  

Bad Request - Invalid Hostname

     

HTTP Error 400. The request hostname is invalid.

2 - Attempt:

Start Menu > ISS > Site Associations > I put new port and IP.

The problem is the same. "Bad Request - Invalid Hostname ..."

3 - Attempt:

I've tried putting link

4 - Attempt:

I have already tried to reply from colleague Rovann Linhalis . The problem remains the same.

5 - Attempt :

I tried to answer the colleague Cigano Morrison Mendez , the problem changed .

Now it is no longer "Bad Request - Invalid Hostname ...". It's now:

  

Service Unavailable HTTP Error 503.

     

The service is unavailable.

Any solution?

    
asked by anonymous 22.05.2017 / 23:48

2 answers

5

You must also allow the use of the address specifically for IIS Express by running the following in administrator mode:

> netsh http add urlacl url=http://192.168.25.50:56987 user=everyone

Note that this is not a firewall configuration. It's a user-based permission.

Having a 503 error, a few more things need to be done:

  • Open your file applicationhost.config file. Usually stays in C:\Users\SeuUsuario\Documents\IISExpress\config\applicationhost.config or in Diretório da Solução\.vs\config\applicationhost.config (in the case of VS2015);
  • Locate your site's entry in the file and add the following:

    <binding protocol="http" bindingInformation=":56987:nomedasuamaquina" />
    
  • Restart IIS Express.

  • 23.05.2017 / 04:54
    5

    Considering that the two computers are already on the same network:

    1-Discover the IP of your computer A:

    open a command prompt, the famous cmd, and type ipconfig. You'll see this screen:

    Youraddresswillbeinthe"IPv4 Address" in my case, 192.168.25.50

    2-Discover the TCP port used by ISS, you can look directly at the url opened by visual studio when you start the project:

    Inmycase,2143,ifyoudonothaveanyportsinformed( link ) the default HTTP port, which is 80, will be adopted.

    3-Unlock the port (if necessary) in the windows firewall:

    Control Panel > Windows Firewall > Advanced Settings > Entry Rules > New Rule > Port > TCP | Specific local ports [report your door] > Allow Connection > All options > Give your rule a name > Finish.

    4-In the browser of computer B, enter the same url that visual studio opens for you, replacing the part of the Host with the IP of computer A.

    EX:

    A: link

    B: link

        
    23.05.2017 / 00:23