简体   繁体   English

调用Windows Phone 8.1 ContactManager.RequestStoreAsync()时,访问被拒绝异常。

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

Using following tutorial from MSDN i am trying to retrieve contacts. 使用来自MSDN的以下教程,我试图检索联系人。 But getting Access denied exception. 但是获取Access拒绝异常。 Quickstart: Selecting user contacts Windows Phone Store app 快速入门:选择用户联系人Windows Phone Store应用

PS: I am using windows phone 8.1 universal app. PS:我正在使用Windows Phone 8.1通用应用程序。

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() 在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task任务)在System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()在App3.Members.d__0.MoveNext()

Check the Requirements section in the documentation of ContactStore class documentation of ContactStore class . 检查ContactStore类的ContactStore类文档中的“需求”部分。

Edit WMAppManifest.xaml and add ID_CAP_CONTACTS capability. 编辑WMAppManifest.xaml并添加ID_CAP_CONTACTS功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows Phone 8.1应用在使用ChatMessageManager.RequestStoreAsync()时会引发访问被拒绝 - Windows phone 8.1 app throws Access denied when using ChatMessageManager.RequestStoreAsync() ContactManager.RequestStoreAsync()抛出System.UnauthorizedAccessException - ContactManager.RequestStoreAsync() throws System.UnauthorizedAccessException Windows Phone 8.1相机初始化 - 访问被拒绝的例外 - Windows Phone 8.1 Camera Initialisation - Access Denied Exception 从图块而不是从Windows Phone 8.1应用程序中的按钮启动FileOpenPicker时,引发访问被拒绝的异常 - FileOpenPicker throws access denied exception when starting it from a tile rather than a button in Windows Phone 8.1 application Windows Phone 8.1语音合成器访问被拒绝? - Windows Phone 8.1 Speech Synthesizer Access Denied? 访问被拒绝。 来自HRESULT的异常:Windows Phone 8.1中的0x80070005 - Access is denied. Exception from HRESULT: 0x80070005 in Windows Phone 8.1 流套接字访问被拒绝Windows Phone 8.1蓝牙 - Stream Socket Access denied Windows Phone 8.1 Bluetooth 移至Windows Phone 8.1中的表单会引发“访问被拒绝。 (来自HRESULT的异常:0x80070005(E_ACCESSDENIED))” - Moving to forms in Windows Phone 8.1 throws “Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))” Windows Phone 8.1-从后台任务创建WriteableBitmap时发生异常 - Windows Phone 8.1 - Exception when creating WriteableBitmap from a Background Task 用图像填充ListView时出现内存不足异常(Windows Phone 8.1) - Out of Memory Exception when Populating ListView with Images (Windows Phone 8.1)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM