简体   繁体   中英

Access Denied exception when calling Windows Phone 8.1 ContactManager.RequestStoreAsync();

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()

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

Edit WMAppManifest.xaml and add ID_CAP_CONTACTS capability.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM