Azure Windows虚拟桌面:登录通过Windows身份验证后初始化任务栏给出错误

问题描述

我有一个可以在citrix和rdp上运行很长时间的WPF应用程序。
最近,它在Azure Windows虚拟桌面上针对一个客户端发布。 对于他们来说,登录后出现如下错误

Error details:
The method or operation cannot be implemented.
   en MS.Internal.AppModel.ITaskbarList.HrInit()
   en System.Windows.Window.ApplyTaskbarItemInfo()
   en System.Windows.Window.WindowFilterMessage(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& handled)
   en System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd,Boolean& handled)
   en MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Boolean& handled)
   en MS.Win32.HwndSubclass.dispatcherCallbackOperation(Object o)
   en System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback,Object args,Int32 numArgs)
   en System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source,Delegate callback,Int32 numArgs,Delegate catchHandler)
   en System.Windows.Threading.dispatcher.LegacyInvokeImpl(dispatcherPriority priority,TimeSpan timeout,Delegate method,Int32 numArgs)
   en MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd,IntPtr lParam)

在这里发现了此错误消息的类似问题,说这是用户登录时(特别是在远程环境中)任务栏初始化的问题。 https://github.com/dotnet/wpf/issues/2377

但找不到任何解决方法或修复程序。 在我的应用程序中,登录成功后,使用此代码初始化任务栏。
_main.TaskbarItemInfo =新的System.Windows.Shell.TaskbarItemInfo(){说明= loginText + Thread.CurrentPrincipal.Identity.Name};

有人可以解释实际上是什么引起了这个问题。 注意:使用WVD-Dekstop客户端可以正常工作时,从浏览器(Web客户端)访问它时出现问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)