Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Our app suddenly fails to show toast notifications #5016

Open
@reiseder

Description

Our app suddenly throws an UnauthorizedAccessException when trying to show a basic toast notification.

It worked fine until a few days ago, so my question would be if this was cause by a Windows update or just our IT department changing something?

The app runs with elevated rights.

It would be great if anybody knows what this registry key is used for?


Exception message:

Failed initializing notifications

Stack trace:

 at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.CreateToastNotifier()
 at Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder.Show(CustomizeToast customize)
 at Microsoft.Toolkit.Uwp.Notifications.ToastContentBuilder.Show()
 at <REDACTED METHOD> in <REDACTE FILE>:line 200
 at <REDACTED METHOD> in <REDACTE FILE>:line 172
 at System.Windows.Threading.DispatcherOperation.InvokeDelegateCore()
 at System.Windows.Threading.DispatcherOperation.InvokeImpl()

Inner exception message:

Access to the registry key 'HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{5a99e422-303c-ea88-3583-506ae78a9819}\LocalServer32' is denied.

Inner exception stack trace:

 at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
 at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
 at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.RegisterComServer(Type activatorType, String exePath)
 at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.RegisterActivator(Type activatorType)
 at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.CreateAndRegisterActivator()
 at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat.Initialize()
 at Microsoft.Toolkit.Uwp.Notifications.ToastNotificationManagerCompat..cctor()

This is how we show the toast notification

private void ShowMessage(string message)
{
 new ToastContentBuilder()
 .AddArgument("action", "viewConversation")
 .AddArgument("conversationId", SomeIdProperty)
 .AddText(SomeProductNameProperty)
 .AddText(message)
 .Show();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /