当我尝试通过我的应用程序从设备日历中删除事件时显示错误
错误消息:
An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll but was not handled in user code Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
请查看以下用于删除操作的代码
AppointmentStore appointmentStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AppCalendarsReadWrite);
AppointmentCalendar sysCal = await appointmentStore.GetAppointmentCalendarAsync(dCalendarID);
await sysCal.DeleteAppointmentAsync(dCalendarEventID);
任何人都对此有任何想法请帮帮我。谢谢你
答案 0 :(得分:0)
您是否有权使用日历?在应用程序清单文件ID_CAP_APPOINTMENTS
中查找WMAppManifest.xml
。