Show Toast notifications over other user accounts #4801
Replies: 1 comment 2 replies
-
@arturfmm have you tried the new 1.2 release of the Windows App SDK yet? That has the new notifications API and builder APIs. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am using ToastNotifierCompat.Show(...) to show notification messages over Microsoft.Toolkit.Uwp.Notifications 7.1.2.
When I run the program as a local user, I do not get any error messages.
As soon as I try to run it as administrator or as another user (runas /user:otherUser ...) I get the following error message:
2022-11-03 11:43:29.233 +01:00 [ERR] Unhandled exception in notification checker.
System.UnauthorizedAccessException: Zugriff verweigert (0x80070005 (E_ACCESSDENIED))
at WinRT.ExceptionHelpers.g__Throw|20_0(Int32 hr)
at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
at ABI.Windows.UI.Notifications.IToastNotifierMethods.Show(IObjectReference _obj, ToastNotification notification)
at Windows.UI.Notifications.ToastNotifier.Show(ToastNotification notification)
at Microsoft.Toolkit.Uwp.Notifications.ToastNotifierCompat.Show(ToastNotification notification)
at Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder.Show(CustomizeToast customize)
at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.PreRegisterIdentityLessApp()
at Microsoft.Toolkit.Uwp.Notifications.ToastNotifierCompat.get_Setting()
at SystemAbstractions.Windows.Notifications.WindowsNotificationCenter.ShowNotification(String title, String description, Uri uri, NotificationConfiguration configuration) in src\SystemAbstractions.Windows\Notifications\WindowsNotificationCenter.cs:line 55
at SystemAbstractions.Windows.Notifications.WindowsNotificationCenter.Show(String title, String description, Uri uri, NotificationConfiguration configuration) in src\SystemAbstractions.Windows\Notifications\WindowsNotificationCenter.cs:line 31
at Notifications.NotificationChecker.ShowNotificationsInternalAsync() in src\Notifications\NotificationChecker.cs:line 93
at Notifications.NotificationChecker.ShowNotificationsAsync() in src\Notifications\NotificationChecker.cs:line 65
at Notifications.NotificationChecker.HandleTimerAsync(Object sender, EventArgs args) in src\Notifications\NotificationChecker.cs:line 50
What do I have to consider, so that I can show notifications also over other user accounts?
Beta Was this translation helpful? Give feedback.
All reactions