0

I am creating an rest API web application with ASP.NET and I have problems to connect to it from external devices that are on my home network. I am using Visual Studio 2019.

I tried to configure it like in:

https://stackoverflow.com/a/15809698

https://blog.kloud.com.au/2017/02/27/remote-access-to-local-aspnet-core-apps-from-mobile-devices/

https://www.youtube.com/watch?v=5ZqDuvTqQVs&t=322s

and many others way found in different answers on stack overflow or other websites and tutorials.

I made my network profile PRIVATE, in order to be discoverable

I made inbound rules in firewall with both ports(44325 and 54344).

I added 192.169.1.119(ipv4 wireless lan) in applicationhost.config, it looks like this:

                <binding protocol="https" bindingInformation="*:44325:localhost" />
                <binding protocol="https" bindingInformation="*:44325:192.168.0.119" />
                <binding protocol="http" bindingInformation="*:54344:localhost" />
                <binding protocol="http" bindingInformation="*:54344:192.168.0.119" />

If i try to connect from my laptop that is hosting the application to 192.168.1.199:43245, it works, it's no problem, but if I try to connect to it from another device on my wi-fi, it tells me "This site can't be reached" and "The connection was reset".

I need to access it from different devices, because I make a poker app in Xamarin forms and I can't use localhost:44325 to post from my app, because I debug it from an emulator and i tried to access the site with 10.0.2.2, but when I use postasync it gives me "Java.Net.Exception:Connection was reset", same that I get when I tried to access it from browser.

Sorry for my bad English and I want to specify that I don't have networking knowledge. If the solution is obvious, please tell it anyway, because I try to solve this problem for 4 days and nothing works.

Or Assayag
  • 5,662
  • 13
  • 57
  • 93
Pavarnaua
  • 1
  • 1
  • Your WIFI router can block device to device connections, so check its manuals please. Network issues are beyond the scope of Stack Overflow. – Lex Li Nov 14 '20 at 17:06

1 Answers1

0

The Conveyor by Keyoti extension tool from Visual Studio solved the problem.

Pavarnaua
  • 1
  • 1