This week, some significant time was spent debugging an issue where a client could not connect to a C#/UWP server.  It turns out that the solution had to do with giving the server accurate capabilities.  Specifically, in the .appxmanifest file, there are three capabilities related to sockets:

  • Internet (client & server)
  • Internet (client)
  • Private network (client & server)

Focusing on the “client & server”, capabilities, one is for Private networks, the other implies Public networks.

On a related note, to change whether your computer is public or private, go to Settings >> Network and toggle “Make this PC discoverable”.  Although that screen is not really clear in the language of “public” or “private”, you can verify which kind of network you are hooked up to by going to the “Network and Sharing Center”, which is typically accessible by right-clicking on the network icon in the System Tray.