Open WaldemarCoding opened 5 years ago
I installed VS on a the terminalserver and ran the BasicUsageExample from source in Debug with "JustMyCode" disabled. When I disconnnect the user while a notification is still visible it will continue to work after reconnect. Doing so after all notifications were closed it stops working. Both times there is a COMExecption thrown. Let me know if I can check/debug something else.
Exception thrown: 'System.Runtime.InteropServices.COMException' in PresentationCore.dll
System.Runtime.InteropServices.COMException
HResult=0x8000FFFF
Message=Schwerwiegender Fehler (Ausnahme von HRESULT: 0x8000FFFF (E_UNEXPECTED))
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>
Tracked it down to collapsing the NotificationsWindow:
https://github.com/rafallopatka/ToastNotifications/blob/95ab84fe76fdf1380c52cacdb861ee0aa0280d29/Src/ToastNotifications/Display/NotificationsWindow.xaml.cs#L64
When setting this.Visibility = Visibility.Hidden
the issue does not seem to occur.
There seem to be some obscure RDP/WPF issues at play here.
Edit: This also occurs when using the "normal" remote desktop and not only when using TerminalServer
Not sure what happend here but closing this was not on purpose. Actually I just wanted to merge the PR of @jidel in my Fork, not closing the original Issue.
There are chances toast will not show after computer wake up or after screen saver closed.
Change this.Visibility = Visibility.Collapsed;
to this.Visibility = Visibility.Hidden ;
solves the problem.
Connecting to a Terminalserver ToastNotifications are displayed. If the User sessions is disconnected (by Admin or after timeout for example) and the user reconnects, the session and software is still open but no Messages are displayed anymore.
Library version
ToastNotification.Messages 2.5.1
Expected behaviour
Messages should be displayed after reconnect.
Actual behaviour
Messages are not displayed/visible after reconnect.
Steps to reproduce behaviour
Run attached demo in Terminalserver sessions, disconnect user and reconnect again.
Code to reproduce behaviour
ToastNotificationDemo.zip
Questions