【发布时间】:2013-02-13 20:57:48
【问题描述】:
我正在尝试通过其自己的共享合同激活我的应用(请 - 不要评论从认证的角度来看这是否可行...应用激活是通过共享合同 UI,除非用户主动,否则不会发生。我在这里询问的是技术问题,而不是用户体验方面的问题 - 谢谢!!)
我的设置方式是这样的:
this.m_shareOperation.ReportStarted();
// ....
this.m_shareOperation.ReportCompleted();
await Launcher.LaunchUriAsync(new Uri("se-myapp:///something"));
一切似乎都正常 - 激活事件/覆盖触发,应用程序实际激活并显示,但是,在我的 OnActivated 代码完成后,出现以下错误:
The operation cannot be completed because the window is being closed. (Exception from HRESULT: 0x802A0201)
我可以做些什么来完成这项工作?有什么想法吗?
出现 this 的调用栈是 this(没有用户代码,不被 UnhandledException 事件处理)...
mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.ThrowAsyncIfNecessary.AnonymousMethod__1(object s) + 0x33 bytes mscorlib.dll!System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(object state) + 0x3e bytes mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback 回调, 对象状态, bool preserveSyncCtx) + 0xa7 字节 mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback 回调, 对象状态, bool preserveSyncCtx) + 0x16 字节 mscorlib.dll!System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() + 0x60 字节 mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() + 0x149 字节 mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() + 0x5 字节 [本机到托管转换]
【问题讨论】:
标签: c# xaml windows-8 windows-store-apps