473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error while capturing details from an eventlog

Hi All,

I have created a tool in c#, which monitors the eventlog ( security log) and fetches the details of every new entry.

The tool runs fine on one of the machines, but on another machine it runs well for some time and then starts giving the following error:

"The description for Event ID '0' in Source '' cannot be found.
The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event: "


The code is as follows:
Expand|Select|Wrap|Line Numbers
  1. if (eventLog == null) 
  2. eventLog = new EventLog("Security"); 
  3. eventLog.EntryWritten += new EntryWrittenEventHandler(EntryToLog); 
  4. eventLog.EnableRaisingEvents = true; 
  5. ... 
  6. ... 
  7. private void EntryToLog(Object source, System.Diagnostics.EntryWrittenEventArgs e) 
  8. < captures various details of e and proccessed them accordingly 
  9.  
I am not able to figure out if the problem is with the tool, the .net framework or with the machine's event log.

Any kind of help will be highly appreciated

Thanks,

Priyanka
Oct 6 '09 #1
3 1958
Plater
7,872 Expert 4TB
When you open the eventlog in the regular viewer, do you see correct messages for the events?
Oct 8 '09 #2
Yes the events logged in the eventvwr are normal and there are no such errors
Oct 8 '09 #3
Plater
7,872 Expert 4TB
Weird. The only time I have ever seen that error was when I was on an embeded/mobile device, and the like "debug" information for the .NET libraries wasn't there. But that was for every exception. Not sure how to fix it
Oct 8 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Tony | last post by:
Dear All, When I run an example program on the http://www.dotnetjunkies.com/quickstart/util/srcview.aspx?path=/quickstart/aspplus/samples/webforms/data/datagrid1.src&file=VB\datagrid1.aspx&font=3 ...
5
by: OpticTygre | last post by:
What is the best way that anyone has found to capture errors inside a windows service? It's pointless to use compilation constants, as you can't "debug" a service very easily, and you can't pass...
0
by: Mart | last post by:
Hi, I have just written (my first) VB.net app using MS Visual Basic 2005 Express Edition Beta. It is fairly simple, it reads some configuration data from an XML file then opens a new window...
0
by: Karthik Srinivasan | last post by:
Hi, My web application which runs on Windows 2003 server writes to EventLog during application startup but I get the following exception Requested registry access is not allowed. at...
8
by: mohit | last post by:
Hi, I am creating a web application in Web Matrix on the .NET framework. I have two directories :AddUser and FormAuth in a Directory P. AddUser contains a file AddUser.aspx FormAuth contains :...
3
by: Olav | last post by:
I get this error in the EventLog when I try to open an ASP.NET 2.0 web page. What should I look for to fix the problem? Olav Event code: 3006 Event message: A parser error has occurred....
4
by: Jason Richmeier | last post by:
I am sure this has been asked at least once before but I could not find anything when searching. If I set the value of the ExitCode property to 1066 for a windows service, the text "A service...
2
by: ashokingroups | last post by:
Hi, I'm not getting clear idea on how to work with EventLog in ASP.NET. My doubt is: How to use the EventLog class with the Application_Error subroutine in the Global.asax file to automatically...
3
by: stexcec | last post by:
hi All, I'm writing a Windows Service with a Threading Timer. In my application, I use EventLog to track the steps in a custom log. Sometimes, the program crashes with an unhandled error after a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.