In my C# application I am using EventLog class to log messages. It works perfectly fine on my machine but doesnt really works on client machine.
Client machine configuration is different than my machine. My machine has Vista OS whereas client has Windows 2003 OS.
I have admin rights on my machine whereas on client machine my application runs under non-admin user previleges.
On client machine I get error as Faulting application , version ,faulting module kernel32.dll
My application stopped crashing on client machine when I commented out EventLog.WriteEntry() method calls and started to write logs into simple text file.
So I was just wondering whether event logging needs administrator privileges or what?
Enviornment details : C#, .net 2.0 framework, Windows Vista, Windows 2003 server, Oracle
Event logging provides a standard, centralized way for applications (and the operating system) to record important software and hardware events. The event logging service records events from various sources and stores them in a single collection called an event log.
Hover mouse over bottom left corner of desktop to make the Start button appear. Right click on the Start button and select Control Panel > System Security and double-click Administrative Tools. Double-click Event Viewer. Select the type of logs that you wish to review (ex: Application, System)
The Write-EventLog cmdlet writes an event to an event log. To write an event to an event log, the event log must exist on the computer and the source must be registered for the event log. The cmdlets that contain the EventLog noun (the EventLog cmdlets) work only on classic event logs.
One solution is to create the required Event Source in your application installer, which runs with admin rights. See http://support.microsoft.com/default.aspx?scid=kb;EN-US;329291
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With