Can't show MessageBox while app is running in assigned access mode in windows 10
<p>I have written a UWP-App and it all works fine (in debug and release mode). I've packaged my app and installed it on a tablet on which windows 10 is installed (I develope on a windows 10 desktop pc), still no issues.<br />
But now I want to run my app in assigned access mode (kiosk mode) on this tablet and suddenly out of nowhere my messageboxes doesn't show up anymore and an error appears.<br />
Because I'm working with the <em>mvvm pattern</em> I've written a helper class for showing messageboxes so I don't need to use <code>Windows.UI</code> in my ViewModels:</p>
<pre><code>public class UserNotificationService : IUserNotificationService
{
   public async Task ShowMessageDialogAsync(string message, string title = null)
   {
      MessageDialog messageDialog = title == null ? new MessageDialog(message) : new MessageDialog(message, title);
      await ShowAsync(messageDialog);
   }

   // This method throws an error
   private async Task ShowAsync(MessageDialog msgDialog)
   {
      // I've to do it like this because otherwise it won't work because I'm working on a different thread while calling this method
      await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.N‌​ormal, async () =&gt; {
         await msgDialog.ShowAsync();
      });
   }
}
</code></pre>
<p><strong>Error:</strong></p>
<blockquote>
<p>A COM call to an ASTA was blocked because the call chain originated in or passed through another ASTA. This call pattern is deadlock-prone and disallowed by apartment call control.</p>
<p>A COM call (IID: {638BB2DB-451D-4661-B099-414F34FFB9F1}, method index: 6) to an ASTA (thread 6992) was blocked because the call chain originated in or passed through another ASTA (thread 7188). This call pattern is deadlock-prone and disallowed by apartment call control. at:    at Windows.ApplicationModel.Core.CoreApplicationView.get_CoreWindow()</p>
</blockquote>
<p>I don't understand what is different while working with the assigned access in windows 10. Like mentioned above this error only appears when the app is running in the assigned access. In any other case all works fine (on the desktop pc and on the tablet).</p>
<p><strong>So my question is:</strong><br />
Has anyone experienced a same issue while developing an app to run in the assigned access mode in windows 10?<br />
Or has anyone an idea of how to solve this issue?</p>