Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toastnotifications are not displayed after reconnecting to Terminalserver (RDP) sessions #99

Open
WaldemarCoding opened this issue Nov 4, 2019 · 4 comments · Fixed by WaldemarCoding/ToastNotifications#1 · May be fixed by #110

Comments

@WaldemarCoding
Copy link

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.
ToastNotificationsError

Code to reproduce behaviour

ToastNotificationDemo.zip

Questions

@WaldemarCoding
Copy link
Author

WaldemarCoding commented Nov 5, 2019

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>

grafik

@jidel
Copy link

jidel commented Mar 31, 2020

Tracked it down to collapsing the NotificationsWindow:


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

jidel added a commit to jidel/ToastNotifications that referenced this issue Apr 2, 2020
Fixes rafallopatka#99 Workaround for wonky  WPF/RDP behaviour when using Transparency & Visibility.Collapsed
@jidel jidel linked a pull request Apr 2, 2020 that will close this issue
WaldemarCoding added a commit to WaldemarCoding/ToastNotifications that referenced this issue Apr 8, 2020
@WaldemarCoding
Copy link
Author

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.

@cuiliang
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants