473,545 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading The Event Log On a Remote System

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.
Nov 15 '05 #1
4 14676
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]
- ni************* *@exisconsultin g.com

"Greg Smith" <gj*@umn.edu> wrote in message
news:u1******** ********@tk2msf tngp13.phx.gbl. ..
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.

Nov 15 '05 #2
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 [.NET/C# MVP]" <ni************ **@exisconsulti ng.com> wrote
in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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]
- ni************* *@exisconsultin g.com

"Greg Smith" <gj*@umn.edu> wrote in message
news:u1******** ********@tk2msf tngp13.phx.gbl. ..
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.


Nov 15 '05 #3

Hi Greg,

I think you can search eventlog samples on google.
Also, there are many code samples in www.codeproject.com, you can
search eventlog keyword on it.

Hope this helps
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Greg Smith" <gj*@umn.edu>
| References: <u1************ **@tk2msftngp13 .phx.gbl>
<#x************ **@TK2MSFTNGP10 .phx.gbl>
| 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: <Oq************ **@TK2MSFTNGP11 .phx.gbl>
| Newsgroups:
microsoft.publi c.dotnet.framew ork.adonet,micr osoft.public.do tnet.languages. c
sharp
| NNTP-Posting-Host: gregorio.med.um n.edu 160.94.110.50
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl
microsoft.publi c.dotnet.langua ges.csharp:1837 72
microsoft.publi c.dotnet.framew ork.adonet:6074 3
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| 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 [.NET/C# MVP]" <ni************ **@exisconsulti ng.com>
wrote
| in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
| > 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]
| > - ni************* *@exisconsultin g.com
| >
| > "Greg Smith" <gj*@umn.edu> wrote in message
| > news:u1******** ********@tk2msf tngp13.phx.gbl. ..
| > > 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.
| > >
| > >
| >
| >
|
|
|

Nov 15 '05 #4

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 : sc***@online.mi crosoft.com <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" <gj*@umn.edu>
References: <u1************ **@tk2msftngp13 .phx.gbl> <#x************ **@TK2MSFTNGP10 .phx.gbl>
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: <Oq************ **@TK2MSFTNGP11 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.adonet,micr osoft.public.do tnet.languages. csharp
NNTP-Posting-Host: gregorio.med.um n.edu 160.94.110.50
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP11.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1837 72 microsoft.publi c.dotnet.framew ork.adonet:6074 3
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp

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 [.NET/C# MVP]" <ni************ **@exisconsulti ng.com> wrote
in message news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
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]
- ni************* *@exisconsultin g.com

"Greg Smith" <gj*@umn.edu> wrote in message
news:u1******** ********@tk2msf tngp13.phx.gbl. ..
> 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 ofany > examples of reading the event log on a remote system in C#.
>
> Any help is greatly appreciated.
>
>



Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1429
by: John White | last post by:
Hi, I am having trouble getting back the entry messages from a remote event log using the System.Diagnostics.EventLog class. When the code is run against the local event log, the event message is formatted correctly as in the normal MMC event viewer, but when called against a remote server, some of the messages return messages as :- The...
4
3822
by: Lee | last post by:
I have created a custom log for my apps to write to. Writing to the log seems to be no problem, it's when I go to read it I get unexpected results. I have an application that reads the log and displays it's contents in a grid, and it also receives event notification from the log when it's updated. When the event fires I get exactly the text...
9
1606
by: Ollie | last post by:
okay sorry for cross posting but want to see if any one can explain the solution to this problem for me: I have a .Net ASP.Net app written in C# that use COM+ components to do some business processing...... When I have the ASP.Net website and the COM+ components installed on the same machine (i.e everything local) it all works fine, and...
1
3306
by: Trevor | last post by:
I posted this message last week but seem to be missing a few days posts. We currently run our web site in php and are now converting it to asp.net to match the rest of our business that is .net based. I have tried using the following code layout to open the file I require but get an illigal character exception when I try and open the file. ...
9
3589
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so that its buffer is bigger than this. I did this expecting the data to be read in one pass.
1
16732
by: hecsan07 | last post by:
Hey I am trying to read the Windows Event Logc. In fact, I am able to read the Event Log. My problem is that I am reading and filtering a large log and it takes a very very very very long time to complete. I am using the ordinary technique for reading/writing from and to the Event Log. I am wondering if there is a better way to speed things...
0
1504
by: Flinker | last post by:
When attempting to read the System event log on a remote system, I receive a "Requested registry access is not allowed" exception. I temporary added myself as an administrator to the remote system and the code worked fine. What permissions need to be assigned to my account on the remote system? If I use the NT 4.0 resource kit utility...
7
7342
by: sergio-p | last post by:
I had no luck in my google search for this answer. Does anyone know if it's possible to read the entries in the Windows Event Log of the server running my PHP page? I'm trying to create an itranet page that lists errors from the server event log.... I'd prefer a pure PHP solution, but I'd be happy to try other alternatives that involve call...
1
1396
by: barneymc | last post by:
Im wondering if anyone has come across a way of reading EventLogs using WMI. The event logs files are restored from another server. Below is the C# class that executes the query. NOTE : The event logs were created on a different (production) machine that I dont have access to. Is it possible to read these files viia WMI ? ...
0
7946
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7457
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7791
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
744
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.