Is it possibile to create a simple way to backup the event log, with such as a batch file or a simple app ?
I need to make it working on a customer's site, where the reference is an non-expert user.
Thanks
...
Can anyone explain what is Windows Event Logging?
...
Why does some characters are appended in my event source name XXXXXXXXXXXX?
The Event Viewer says this:
The description for Event ID ( 5 ) in Source ( XXXXXXXXXXXXtings\All Usõ ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may b...
I am developing a log parsing service that captures specific security events in the Windows Event Log. My initial thought was to use Microsoft's LogParser, but I am not looking for any functionality beyond selecting specific Instance/Event IDs already known in advance.
After some benchmarking, I found that iterating over the entire .NE...
Is there some way to set the permissions on a Windows event log, in this case Application, similar to what you can do for directories and files ?
...
I want to use the Windows Eventing 6 API from a C# application to log messages to a specific channel in Windows Server 2008 event log. There is a good example on how to use it but it's only C++. In the example it's mentioned that .NET doesn't support Windows Eventing 6. There are 2 examples in http://msdn.microsoft.com/en-us/magazine/cc1...
I'm attempting to set up basic logging to the windows event log in .net via System.Diagnostics.EventLog, but I'm failing to see any events actually getting written to the log. Consider the following code:
// Elsewhere in the class
private static readonly string EventLogName = "LogName";
private static readonly string EventLogSource = "...
I work on an open source product called EVEMon written in C# targeting the .NET 2.0 platform, I have one user who is suffering from a strange .NET crash that we have been unable to resolve.
Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 4/29/2009
Time: 10:58:10 PM
User: N/A
Co...
I have the following code in both a C# console app and a C# windows service. It works in the console app. It picks up the specified event, and calls MatchEvent() correctly. The same code in a C# windows service does not pick up the same specified event, it never sees it, but sees the other events. The event in question is written to the ...
Due to a limitation in the .NET EventLog class, I have some code using PInvoke that logs to the Application log. The code works without a problem.
But now, I'd like to log to a custom event log. So, I tried changing the 2nd parameter of the RegisterEventSource to "companyX" (my custom log). It correctly wrote to "companyX" (instead of t...
I am working on an application which reads eventlogs(Application) from remote machines. I am making use of EventLog class in .net and then iterating on the Log entries but this is very slow. In some cases, some machines have 40000+ log entries and it takes hours to iterate through the entries.
what is the best way to accomplish this tas...
I'm writing to the windows event log using C#. I can set every field visible in the mmc.exe "Computer Management" tool, except for the User field.
The client application is ASP.NET and uses forms authentication.
public static void WriteOnce()
{
EventLog log = new EventLog("MyApp");
if (!EventLog.SourceExists("MySource"))
{...
When writing to the event log, our application uses enums to generate an error number to attach to event log items. The idea is to list the things that we know can go wrong, and assign IDs to each one so we can identify right away what went wrong when viewing the event log.
One enum contains values/IDs that represent a class in the appl...
What permissions do I need to give a User for them to be able to write to the Windows EventLog? I have an ASP.NET application that needs to impersonate a user and that impersonated user must be able to write the event log
...
If I throw an unhandled exception from ASP.NET, a warning is added to the eventlog (as expected).
But if the message in the exception contains a %, the message in the eventlog gets garbled:
If the Message was
Could not find foo%20bar
the eventlog will read
Could not find foohttp://localhost/testpage.aspxbar
Other numeric values...
Hello everyone,
I am using Windows Server 2003 x64 + VSTS 2008 + .Net 3.5 + C#, the API EventLog.CreateEventSource has two parameters, source and logName.
I have two questions,
How to call function EventLog.CreateEventSource from PowerShell?
What are the meanings of parameter source and logName? How their values are reflected in Wind...
I am trying to get the new System.Diagnostics.Eventing event logging working in a simple .Net app before integrating it into my application.
Working off of this page, I created a manifest, built a simple app that fires an event and registered the provider to see it in the event viewer. I don't get any errors in event viewer or my sampl...
I've got a System.Diagnostics.Eventing.EventProvider class trying to write to a custom event log. The event log was created using a manifest file and the procedure layed out on this page. You can see the new provider and channel in the windows Event Viewer, but for some reason no events that get written seem to show up there.
When I ch...
I am pretty new to logging. I get this jibberish in my event log.
The description for Event ID ( 0 ) in Source ( xyAMP ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this descript...
I'm trying to write to the event viewer in my c# code, but I'm getting the wonderful "Object reference not set to an instance of an object" message. I'd appreciate some help with this code, either what's wrong with it or even a better way to do it. Here's what I have for writing to the event log:
private void WriteToEventLog(string me...