0

I've developed a WebApi server. If I use localhost:9615/api/method it works fine. Even if I use an IP address 192.168.0.1:9615/api/method.

I am very certain that a few weeks ago if i connected through my router with port forwarding like 123.123.123.123:9615/api/method it worked as well, but now it does not work anymore. I get a connection refused back. Is there something that I'm missing. When I connect to the ip itself the IIS welcome screen comes on which means that the port forwarding works, but for some reason my WebAPI app does not want to accept the connection.

I've changed applicationhost.config to accept external connections

                <binding protocol="http" bindingInformation="*:9615:localhost" />
                <binding protocol="http" bindingInformation="*:9615:*" />

I also added a url reservation with

netsh http add urlacl url=http://*:9615/ user=everyone

It shows in my reservations as

Reserved URL            : http://*:9615/
    User: \Everyone
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;WD)

From Wireshark it seems like the ACK get send through, but also a RST. Then there is just a lot of retransmissions, and RST, ACK.

Jaques
  • 2,215
  • 1
  • 18
  • 35

1 Answers1

1

IIS Express by default only allows localhost access. You need to enable external access, see: IIS Express enable external request. You should just use the full blown IIS, not like it costs any money. It's more robust and has more features.

SledgeHammer
  • 7,338
  • 6
  • 41
  • 86
  • Sorry, I forgot to mention that i've already changed to application.config file to accept external connections – Jaques Sep 10 '17 at 19:09