IIS 7 and Above
Unable to access to Web Service externally
Last post Jul 17, 2019 02:57 PM by tecnicxci
Jul 16, 2019 03:04 PM|tecnicxci|LINK
I've searched for these troubleshoot in the forum and I got a lot of entries but none has solved my issue, I did previously post my question in Super
User but it seems no one can help me, so I'm copying the problem here to try some luck.
For background, I have a AspNet core webservice installed in my own server using iis. When accessing from inside the network the service response perfectly, but when accessing from outside (using the mobile phone data or a friends computer) never responds.
I installed the service on an external server, that a friend of mine gave me for testing purposes, that doesn't have any type of firewall and it worked fine.
The problem is that I've already forwarded my port and disabled the firewall, but still can't access from outside to the service on my own server. I did contact my ISP to check if there were any problems, they did disable the firewall of the router, but
still wasn't working. I have used https://www.yougetsignal.com/tools/open-ports/ to see if the port is open and it is.
Things I've done:
Since my installation is similar to the installation of the following link I tried to use a reverse proxy following the steps mentioned in the
link, but is still not working.
Here is the log data of the firewall with a public request (first one) and a local request (second one):
#Software: Microsoft Windows Firewall
#Time Format: Local
#Fields: date time action protocol src-ip dst-ip src-port dst-port size tcpflags tcpsyn tcpack tcpwin icmptype icmpcode info path
2019-07-16 15:50:49 ALLOW TCP 192.168.0.254 192.168.0.10 62469 5000 0 - 0 0 0 - - - RECEIVE
2019-07-16 15:52:05 ALLOW TCP 192.168.0.50 192.168.0.10 51251 5000 0 - 0 0 0 - - - RECEIVE
And here is the log file of my web service:
[2019/07/16 15:44:03.830]: (Info): Starting
[2019/07/16 15:52:07.765]: (Info): PublicController -> CheckServer
[2019/07/16 15:52:07.767]: (Info): CheckServer
The firewall is not blocking the request as we can see, but the request never arrives at the web service.
I've used Microsoft Message Analyzer and I get the following for local request: Analyzer of a local request
And the following for an external request: Analyzer of a public request
I see that it does not return the HTTP response in the public request, I don't know why any suggestions?
Jul 17, 2019 02:03 PM|lextm|LINK
"Analyzer of a public request" shows that your router (192.168.0.254) did create a valid TCP connection to IIS, but failed to send a valid HTTP request. All it did was a few TCP
packets with AP flags set.
So there is nothing wrong on IIS/Windows side, but the router and you need to contact its vendor to see how to fix that.
Jul 17, 2019 02:57 PM|tecnicxci|LINK
Hi @lextm, thanks for responding, I've contacted multiple times my ISP, who is also the router vendor, because I thought it was a problem with port forwarding but now I see it's not.
For what you said the problem might probably be that the router does not respond to HTTP request, I want to address them so they can solve it, but I don't know what to tell them exactly, I should tell them that
their router is dropping HTTP packages? I don't think I fully understand the issue.
Okay, I got it working, but I don't really have a proper solution. Today my coworkers told me that the internet stopped working a few times, probably because my ISP was doing something, so when I came back I tried to connect to the web service and it worked,
I didn't make any changes, I didn't touch or do anything, but now it just works. I thought that my ISP had resolved the issue after calling them too many times, so I contacted them asking what they did and they told me that they didn't do anything (I don't
know what to think...).
So in conclusion, if none of the methods I tried to solve the issue works for you just contact the ISP until they solve the issue.