调用Windows Phone 8.1 ContactManager.RequestStoreAsync()时,访问被拒绝异常. [英] Access Denied exception when calling Windows Phone 8.1 ContactManager.RequestStoreAsync();

查看:60
本文介绍了调用Windows Phone 8.1 ContactManager.RequestStoreAsync()时,访问被拒绝异常.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用来自MSDN的以下教程,我正在尝试检索联系人.但是获取Access拒绝异常.快速入门:选择用户联系人Windows Phone Store应用

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:我正在使用Windows Phone 8.1通用应用程序.

PS: I am using windows phone 8.1 universal app.

我在下一行遇到异常

 ContactStore contactStore = await ContactManager.RequestStoreAsync();

及以下是异常堆栈跟踪

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

在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)在System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()处在App3.Members.d__0.MoveNext()

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

推荐答案

在ContactStore类ContactStore类的文档.

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

编辑WMAppManifest.xaml并添加 ID_CAP_CONTACTS 功能.

Edit WMAppManifest.xaml and add ID_CAP_CONTACTS capability.

这篇关于调用Windows Phone 8.1 ContactManager.RequestStoreAsync()时,访问被拒绝异常.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆