View on GitHub

Yllibed.HttpServer

Simple versatile web service for mobile applications

Yllibed HttpServer

This is a versatile http server designed to be used in mobile/UWP applications.

Packages and NuGet Statistics

Package Downloads Stable Version Pre-release Version
HttpServer Downloads Stable Pre-release
HttpServer.Json Downloads Stable Pre-release

Quick start-up

  1. First install nuget package:
         PM> Install-Package Yllibed.HttpServer 
    
  2. Register a server in your app:
     var myServer = new Server(8080); // create a web server on port 8080
     myServer.RegisterHandler(new StaticHandler("/", "text/plain", "Hello, world!")); // register a handler for the root
     var (uri4, uri6) = myServer.Start(); // start the server and get the URIs
    

What it is

What it is not

Limitations

What you can do with it

Tips

Opening port on Windows 10 IoT (typically on a Raspberry Pi)

If you want to open “any” port on a Raspberry Pi running Windows 10 IoT, you may need to open a port.

  1. First, connect to your device using powershell:
       Enter-PsSession -ComputerName <device name or ip> -Credential .\Administrator
    
  2. 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