HomeWindowsUnauthorizedAccessException when trying to get the Unique DeviceID in Windows Phone

UnauthorizedAccessException when trying to get the Unique DeviceID in Windows Phone

When trying to retrieve the Unique Device ID using the DeviceExtendedProperties from your Windows Phone application, you might encounter the below error

UnauthorizedAccessException when trying to get the Unique DeviceID in Windows Phone

UnauthorizedAccessException was unhandled by user code

An exception of type ‘System.UnauthorizedAccessException’ occurred in Microsoft.Phone.ni.dll but was not handled in user code.

To resolve this error, verify if the ID_CAP_IDENTITY_DEVICE capability is set in the Application Manifest file. If it is not set, enable it. Save the project, build and run your Windows Phone Project.

UnauthorizedAccessException when trying to get the Unique DeviceID in Windows Phone

You see that UnauthorizedAccessException when trying to get the Device ID would be vanished and you will get the right unique device from the Phone.

 

Leave a Reply

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...