Reputation: 1418
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:
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:
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?
Upvotes: 2
Views: 788
Reputation: 1488
If you have more than 682 records CheckNetIsolation.exe LoopbackExempt -s
none of your app will be exempted. I don't know why. Try to delete temp apps with PowerShell:
Get-AppxPackage *app.a* | Remove-AppxPackage
This helped me a lot.
Upvotes: 1
Reputation: 2927
I had also come across a similar situation, I had resolved this using Fiddler which comes with a tool WinConfig in its menubar to restrict LoopbackExempt.
Upvotes: 0