2
votes

Using following tutorial from MSDN i am trying to retrieve contacts. But getting Access denied exception. Quickstart: Selecting user contacts Windows Phone Store app

PS: I am using windows phone 8.1 universal app.

I am getting exception at following line

 ContactStore contactStore = await ContactManager.RequestStoreAsync();

and below is the exception stack trace

   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at App3.Members.d__0.MoveNext()

1

1 Answers

5
votes

Check the Requirements section in the documentation of ContactStore class documentation of ContactStore class.

Edit WMAppManifest.xaml and add ID_CAP_CONTACTS capability.