Reading The Event Log On a Remote System

  • Thread starter Thread starter Greg Smith
  • Start date Start date
G

Greg Smith

I have an old application that analyzes the data in the event log on one of
our servers. I would like to convert it to C#. Does anybody know of any
examples of reading the event log on a remote system in C#.

Any help is greatly appreciated.
 
Greg,

You can use the EventLog class to read the event log. There is a
constructor which takes two strings. The first is the name of the event log
to read. The second is the name of the machine to open the event log on.

Hope this helps.
 
Thank you for your response. This was helpful but due to the fact that I am
still fairly new to C# I would really benefit from looking at some sample
code. Do you know of any?


Nicholas Paldino said:
Greg,

You can use the EventLog class to read the event log. There is a
constructor which takes two strings. The first is the name of the event log
to read. The second is the name of the machine to open the event log on.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Greg Smith said:
I have an old application that analyzes the data in the event log on one of
our servers. I would like to convert it to C#. Does anybody know of any
examples of reading the event log on a remote system in C#.

Any help is greatly appreciated.
 
Only sample code I know about is in this article

815314 HOW TO: Manage Event Logs Using Visual C# .NET
http://support.microsoft.com/?id=815314

It may be what you need. Don't know what else might be available out on the many DOTNet sites on the web...


Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.

Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect


--------------------
From: "Greg Smith" <[email protected]>
References: <u1s#[email protected]> <#[email protected]>
Subject: Re: Reading The Event Log On a Remote System
Date: Wed, 10 Sep 2003 09:15:07 -0500
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.adonet,microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: gregorio.med.umn.edu 160.94.110.50
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:183772 microsoft.public.dotnet.framework.adonet:60743
X-Tomcat-NG: microsoft.public.dotnet.framework.adonet

Thank you for your response. This was helpful but due to the fact that I am
still fairly new to C# I would really benefit from looking at some sample
code. Do you know of any?


Nicholas Paldino said:
Greg,

You can use the EventLog class to read the event log. There is a
constructor which takes two strings. The first is the name of the event log
to read. The second is the name of the machine to open the event log on.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Greg Smith said:
I have an old application that analyzes the data in the event log on one of
our servers. I would like to convert it to C#. Does anybody know of any
examples of reading the event log on a remote system in C#.

Any help is greatly appreciated.
 
Looks like what I need to get me started.

Thank you.

Scot Rose said:
Only sample code I know about is in this article

815314 HOW TO: Manage Event Logs Using Visual C# .NET
http://support.microsoft.com/?id=815314

It may be what you need. Don't know what else might be available out on
the many DOTNet sites on the web...
Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

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

Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect


--------------------
From: "Greg Smith" <[email protected]>
References: <u1s#[email protected]>
Subject: Re: Reading The Event Log On a Remote System
Date: Wed, 10 Sep 2003 09:15:07 -0500
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups:
microsoft.public.dotnet.framework.adonet,microsoft.public.dotnet.languages.c
sharp
NNTP-Posting-Host: gregorio.med.umn.edu 160.94.110.50
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:183772
microsoft.public.dotnet.framework.adonet:60743
X-Tomcat-NG: microsoft.public.dotnet.framework.adonet

Thank you for your response. This was helpful but due to the fact that I am
still fairly new to C# I would really benefit from looking at some sample
code. Do you know of any?


in message news:%[email protected]...
Greg,

You can use the EventLog class to read the event log. There is a
constructor which takes two strings. The first is the name of the
event
log
to read. The second is the name of the machine to open the event log on.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have an old application that analyzes the data in the event log on one
of
our servers. I would like to convert it to C#. Does anybody know of any
examples of reading the event log on a remote system in C#.

Any help is greatly appreciated.
 
Back
Top