views:

43

answers:

0

When running my Windows Forms application on Windows 7 I get the following exception message:

Requested registry access is not allowed.
       at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
       at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
       at Microsoft.Win32.RegistryKey.OpenSubKey(String name)
       at System.Windows.Input.StylusLogic.ReadSystemConfig()
       at System.Windows.Input.StylusLogic..ctor(InputManager inputManager)
       at System.Windows.Input.InputManager..ctor()
       at System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
       at System.Windows.Input.InputManager.get_Current()
       at System.Windows.Input.KeyboardNavigation..ctor()
       at System.Windows.FrameworkElement.FrameworkServices..ctor()
       at System.Windows.FrameworkElement.EnsureFrameworkServices()
       at System.Windows.FrameworkElement..ctor()
       at System.Windows.Controls.Panel..ctor()
       at System.Windows.Controls.DockPanel..ctor()
       at System.Windows.Forms.Integration.AvalonAdapter..ctor(ElementHost hostControl)
       at System.Windows.Forms.Integration.ElementHost..ctor()
       at ApplicationForm.InitializeComponent()

The application mixes WPF and Windows Forms controls. The exception is intermittent and seems to come from the AvalonAdaptor...

Any ideas?