This is a versatile http server designed to be used in mobile/UWP applications.
Package | Build | Nuget |
---|---|---|
Yllibed.Framework - stable | ||
Yllibed.HttpServer - stable |
-
First install nuget package:
PM> Install-Package Yllibed.HttpServer
-
Register a server in your app:
var myServer = new HttpServer(8080); // create a web server on port 8080 myServer.RegisterHandler(new StaticHandler(""))
- Simple web server which can be extended using custom code
- Integration of http framework like NancyFx
- This HTTP server is not designed for performance or high capacity
- There is no support for HTTP 2.0 (yet) or WebSockets
- There is no support for HTTPS (TLS)
- On UWP, you can't connect to the server from the same machine (it's a UWP limitation).
- Use it for building a headless Windows IoT app (for SSDP discovery or simply end-user configuration)
- Use it for remote diagnostics/monitoring on your app
If you want to open "any" port on a Raspberry Pi running Windows 10 IoT, you may need to open a port.
- First, connect to your device using powershell:
Enter-PsSession -ComputerName <device name or ip> -Credential .\Administrator
- Add a rule in the firewall to authorize inbound traffic to your application: (example for port 8080)
netsh advfirewall firewall add rule name="My Application Webserver" dir=in action=allow protocol=TCP localport=8080