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’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...