I am writing a web server as a Universal Windows Platform app in C#. Here is my code so far:
sealed partial class App : Application { int port =
Raymond Zuo's solution really works. But the main thing not to forget are capabilities in Packages.appxmanifest. In order to run the server in Private networks one should add:
And in order to run the server in Public network: