On Sat, 29 Jan 2005 10:57:10 -0000, Sachin wrote:
I am trying to create and write to Event Log on Windows Server 2003 system
in a simple C# application.
However, it throws the exception saying that Access is denied.
What permission and settings are required for creating and writing the event
logs on the system.
Any help or pointer.
Typically you can write to the event log with no problems, but you need to
use an existing log file and existing event sources unless you run under
high privileges.
One option, if you want your own log or sources, is to create an installer
that would be run be an admin on the machine to create your log and
sources. Then your app can write to them under its restricted privileges.
Info on creating an installer and then using installutil.exe can be found
in the following articles:
EventLogInstaller Class
http://msdn.microsoft.com/library/en...classtopic.asp
Installer Tool (Installutil.exe)
http://msdn.microsoft.com/library/en...allutilexe.asp
--
Tom Porterfield