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

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...