views:

22

answers:

2

Hi,

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

+4  A: 

Maybe this link will help:

http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx

Ardman
@Ardman, Thank for your help but it seems that your link is broken. Can you please edit your answer?
Shekhar
@Shekhar fixed it.
Shoban
@Shoban, Thanks
Shekhar
A: 

If you write to an event log, you must specify or create an event Source. You must have administrative rights on the computer to create a new event source.

Shoban
I guess I have to re-read even log theory.
Shekhar