2

I've started working on this project and I'm absolutely stuck on this stage.

I have this small project that for the moment only returns this "Hello world!" string:

using Microsoft.AspNetCore.Mvc;

namespace BackEnd.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class HelloController : ControllerBase
    {
        [HttpGet]
        public string Get()
        {
            return "Hello world!";
        }
    }
}

I want it to be able to be able to be accessed globally by anyone on the internet.

I have found and followed this tutorial on this site:

https://weblog.west-wind.com/posts/2016/sep/28/external-network-access-to-kestrel-and-iis-express-in-aspnet-core

Which did help me a bit and everything seemed to work fine except, when using my external IP, the one available to everyone on the internet worked ONLY IF the device was on THE SAME local network meaning: My pc, laptop and phone were capable of getting the "Hello world!" while on a local network even though I used my EXTERNAL ip address but when I switch off the wifi and enabled data on my phone and made hotspot to test with my laptop, phone just got stuck loading while the laptop gave ERR_CONNECTION_TIMED_OUT.

I followed this How to enable external request in IIS Express? example with the "iisexpress-proxy" but I had the same problem as before. My guess is that iis blocks external ip addresses by default?

I found another solution for this such as Conveyor by Keyoti but that one requires another program and an account neither of which I'm allowed to use in the current project.

What do I need to do to properly send/receive a packet as an external client to my iis server?

  • "when I switch off the wifi and enabled data on my phone and made hotspot to test with my laptop, phone just got stuck loading while the laptop gave ERR_CONNECTION_TIMED_OUT". That can be caused by your hotspot settings, as it can prevent devices from the same network to talk to each other (isolation). Your WIFI router can also be configured in isolation mode. – Lex Li Apr 05 '20 at 18:32

0 Answers0