Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 移动到Windows Phone 8.1中的窗体会引发;访问被拒绝。(HRESULT的例外:0x80070005(E_ACCESSDENIED))“;_C#_Navigation_Windows Phone 8.1_Access Denied - Fatal编程技术网

C# 移动到Windows Phone 8.1中的窗体会引发;访问被拒绝。(HRESULT的例外:0x80070005(E_ACCESSDENIED))“;

C# 移动到Windows Phone 8.1中的窗体会引发;访问被拒绝。(HRESULT的例外:0x80070005(E_ACCESSDENIED))“;,c#,navigation,windows-phone-8.1,access-denied,C#,Navigation,Windows Phone 8.1,Access Denied,我创建了一个WindowsPhone8.1应用程序(C#),基本上可以将我导航到另一个显示地图视图的窗体。按钮单击事件的问题代码: public void ToOriginal_Click(object sender, RoutedEventArgs e) { this.Frame.Navigate(typeof(Pages.MapPage)); //Pages is a folder where all pages are put in. Map

我创建了一个WindowsPhone8.1应用程序(C#),基本上可以将我导航到另一个显示地图视图的窗体。按钮单击事件的问题代码:

        public void ToOriginal_Click(object sender, RoutedEventArgs e)
    {
      this.Frame.Navigate(typeof(Pages.MapPage));
      //Pages is a folder where all pages are put in. MapPage is what I open
    }
此外,还采用了:

using Windows.UI.Xaml.Navigation;
引发的异常为:

Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
我在Package.appxmanifest中添加了定位功能。它以前在某个点上起作用,但我改变了什么,导致现在这样的情况吗

我四处寻找,但没有找到任何类似的东西。代码相同,但原因不同。这似乎是当某些内容被拒绝时抛出的一般异常代码。但是如何解决这个问题呢


如果有人可以将我链接到答案或提供有关此问题的信息,请告诉我。

即使我遇到此问题,也要替换
此.Frame.Navigate(typeof(Pages.MapPage))


这应该能解决问题

这似乎不能解决我的问题。除了勾选位置功能外,您是否在appxmanifest中添加了其他内容?我没有勾选位置,而是将导航行替换为Dispatcher.RunAsync行
 await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
               Frame.Navigate(typeof(Pages.MapPage)));