UWP Raspberry Pi Webserver Problem

I am following a Web server application example, processing incoming requests over TCP using a port.

Sample application with code: https://incredibits.io/project/windows-10-iot-internet-of-things-tips/windows-10-iot-raspberry-pi-web-server

When debugging a UWP application on my Windows 10 computer and trying to access the local IP (192.168.xx <- Ofcourse, I entered my actual local IP address), I get what I should. The application receives an incoming request and returns some data to me (the client) on another computer.

The problems I am facing is that when I deploy it in my Raspberry Pi 3 with Windows IOT Core (the newest from Insider), I generally cannot access the application from my client computer. Is this something with the Pi firewall or something else preventing it?

I CAN access the IoT Core web interface on port 8080, but I cannot access my application running on port 80. (I tried to switch the port to another, and also works locally on my Windows 10, but not on Pi )

Does anyone know a solution or is facing a similar problem?

Note: I also tried examples like ( https://ms-iot.imtqy.com/content/en-US/win10/samples/BlinkyWebServer.htm ), which works on my Windows 10 PC again, and to it can be accessed by another computer if they are on the same network, but not on my Pi)

+6
source share
1 answer

I found a solution to my problem.

The port I used was not open in the Firewall Pi Firewall. I could not find how to add a rule to the firewall, but after some help on the Freenode C # Chat forum I found the following snippet:

First I enter Pi through PowerShell

Enter-PsSession -ComputerName MyRaspberryPi-Credential MyRaspberryPi\Administrator 

Then I manually add the opening of the port firewall that I use. In this case, port 8080.

 netsh advfirewall firewall add rule name="Raspberry Pi Webserver" dir=in action=allow protocol=TCP localport=8080 

After that, everything worked as expected. I could access the port on my Raspberry Pi! All is well!

Thanks to @ canton7 and @ taylor-kidd in the comments for coming up with suggestions that finally helped me!

EDIT April 12 : It appears that this issue with the firewall not opening was actually a known Microsoft issue. They write that in their Relase notes for Insider Preview version 14295 (which I use) here is http://ms-iot.imtqy.com/content/en-US/win10/ReleaseNotesInsiderPreview.htm

+6
source

All Articles