Share via


Cannot access my webserver

Question

Wednesday, August 24, 2016 7:15 AM

I wrote a small web Server (UWP) which I will deploy in Raspberry Pi. Since it is an UWP app, I can run it on Laptop as well.

First, the webserver works well. I have two configurations, when runnung on the Laptop, port 8080 is used, since 80 is used by the IIS. When running on PI2, port 80 is used, since 8080 is used by the PI2 webserver.

Now comming to my problem. Running the webserever in the net of our company (10.x.x.x) I can access the webserver from any other device. But running the same application on the same Laptop in my private net at home (192.168.0.x) I cannot access it from a second device, but I can access the IIS on port 80. And finaly the same happens, when I deploy my webserver to a desktop pc in my home net. Next I tried it on another private Network (192.168.1.x) with a different router but the same laptop. The propblem is the same.

On several PI2 all works as expected, on all networks.

Is there any build in Firewall setting in Windows 10 preventing me accessing the webserver on port 8080? I also tried to stop the IIS and configure my webserver for port 80, but with the same result. Could it be a setting problem on my router (Fritzbox), which I do not think, because having no problems with PI2?

Can anyone give me a hint where I can search for some configuration settings to solve the problem?

All replies (6)

Wednesday, August 24, 2016 1:59 PM âś…Answered | 1 vote

On the machine running the web server that is having the issue, from a command prompt enter \ copy and paste;

netstat -a | findstr -i "listen"

That shows all IP ports the machine is listening on, does it show 8080 ? Be like TCP    0.0.0.0:8080 at the beginning of a line. If that is not showing then for some reason your webserver is not listening on that port.

Port 8080 is blocked by default by Windows Firewall. So access the firewall (right click the network icon near the clock 'Open Network and Sharing Centre', then 'Windows Firewall' bottom left. You can turn it off temporarily as a test, or under 'Advanced settings' set a new Inbound Rule for Port 8080.


Tuesday, August 30, 2016 7:56 AM

Hi,

How about the issue, is there anything to update?

Best regards

Please remember to mark the replies as an answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Friday, September 2, 2016 10:26 AM

I played a bit with my firewall fetting, which I also already assumed to be the reason.

First turned off the firewall, which didn't help. Then, when the firewall was off, I've got several concerns from the system to turn it on. After doing this, it worked. So I do not know, what the reason was.

The only difference when it didn't work was the IP of the local net, 10.x.x.x when it worked and 192.168.x.x when it didn't. I would give it a try to set my net at home to 10.x.x.x, but since it now works, I cannot reproduce the failiure.

The answers I've got here, didn't gave me a hint. The server was listening on port 8080, it was not blocked from the firewall.


Friday, September 2, 2016 11:38 AM

That you can not access a local webserver from UWP is by design,
you need to add the loopback exemption.
The following link describes this, and also contains info on how to diagnose problems:
How to enable loopback and troubleshoot network isolation (Windows Runtime apps)


Friday, September 2, 2016 11:44 AM

Where did I write "I will access a local server from UWP"?

I know, that this isn't possible by design. My attempt was to access it from a different device in a local net.


Friday, September 2, 2016 11:59 AM

sorry, I misread the "same application on the same Laptop" as meaning you tried to access it from the same device.
But CheckNetIsolation.exe might nevertheless help diagnosing the problem.