Access Denied Exception on WinUI app while using PeerFinder.FindAllPeersAsync()

Gueztt 1 Reputation point
2022-08-31T09:46:41.493+00:00

While using the PeerFinder API form Windows.Networking.Proximity I get the exception UnauthorizedAccessException: Access is denied. (0x80070005 (E_ACCESSDENIED)) when using PeerFinder.FindAllPeersAsync(). I'm unable to trace the reason for this. I have enabled App Capabilities for Proximity and Internet.

The same code when used in Console App works just fine.

The issue is also reproducible on UWP app.

Steps to reproduce the bug

  1. Run the app and click on Search for Peers Button.
    PeerFinderApp.zip

    Screenshots

  2. Exception Screenshot

Screenshot 2022-08-31 131709

  1. Exception Details

Screenshot 2022-08-31 132251

NuGet package version

WinUI 3 - Windows App SDK 1.1.4

Universal Windows Platform (UWP)
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
723 questions
{count} votes