I am developing an UWP Application that should be able to accept incomming TCP connections.
I have given it the following capabilities in the package manifest:
- Internet (Client)
- Internet (Client/Server)
- Private Networks (Client/Server)
I am using the StreamSocketListener from Windows.Networking.Sockets
Connections from other devices are established just fine.
Hovever: I can not connect from my own device over the loopback interface
As per this document from Microsoft, UWP does indeed restrict connections over the loopback interface, but:
Apps installed and run in Visual Studio will automatically be registered as being exempt from the loopback restrictions.
This is the scenario I'm in. And checking the Debug section in the application properties reveals that the Allow local network loopback
is checked.
I checked the loopback excemptions on the system via
CheckNetIsolation.exe LoopbackExempt -s
My apps SID does appear in the list.
A comment under this SO answer suggested clearing the list and adding each entry manually. This did not resolve the problem.
Other things I have attempted:
- Changing the release version of the App (Did not help)
- Uninstalling and redeploying the App (Didi not help)
- Setting up a fresh project. (Did not help)
- Rebooting the system. (Did not help)
- Using my LAN IP Address instead of the Loopback Address (Did not help)
- Bashing my head against the wall (Did not help)
So the final question:
How can I enable loopback connections to a UWP app despite doing every step nescessary
Has anybody further experience with this? Is there some hidden trick I need to perform so I can connect from the local device?