471,087 Members | 943 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,087 software developers and data experts.

Security problem with Exception Management Block

When running my application on accounts that don't have admin privileges, I
recieve the following error (I am trying to write to the Application event
log):

System.Security.SecurityException: The event source
ExceptionManagerInternalException does not exist and cannot be created with
the current permissions. ---> System.Security.SecurityException: Requested
registry access is not allowed.
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String
logName, String machineName, Boolean useMutex)
at System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String
logName, String machineName)
at System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String
logName)
at
Microsoft.ApplicationBlocks.ExceptionManagement.De faultPublisher.VerifyValidSource()
--- End of inner exception stack trace ---
at
Microsoft.ApplicationBlocks.ExceptionManagement.De faultPublisher.VerifyValidSource()
at
Microsoft.ApplicationBlocks.ExceptionManagement.De faultPublisher.Publish(Exception
exception, NameValueCollection additionalInfo, NameValueCollection
configSettings)
at
Microsoft.ApplicationBlocks.ExceptionManagement.Ex ceptionManager.PublishInternalException(Exception exception, NameValueCollection additionalInfo)
at
Microsoft.ApplicationBlocks.ExceptionManagement.Ex ceptionManager.Publish(Exception exception, NameValueCollection additionalInfo)
at
Microsoft.ApplicationBlocks.ExceptionManagement.Ex ceptionManager.Publish(Exception exception)
at FERC.DAMS.Common.ExceptionHandler.Publish(Exceptio n ex)
at FERC.DAMS.UI.Windows.Controls.Screen.DamScreenCtl. Finish()
at FERC.DAMS.UI.Windows.Form.Form1.mnuFinish_Click(Ob ject sender,
EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

What permissions do I need to give these accounts to make them work correctly?

Thanks,
Don Hurley
Jul 21 '05 #1
1 5926
Hi Don,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're trying to run an
application without administrator's privileges, you got an exception when
writing to event log. If there is any misunderstanding, please feel free to
let me know.

This exception is thrown because you don't have permission to write to or
create the certain registry keys. So please do the following for workaround.

To workaround this problem, you can grant permission to the user account
for full access to the following registry key.

HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\<L ogType>\<Source>.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Páll Ólafsson | last post: by
1 post views Thread by Danko Greiner | last post: by
1 post views Thread by Donald Hurley | last post: by
10 posts views Thread by David Thielen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.