windows-event-log

How to view Windows Event Log remotely with limited privileges

To debug some code, I would like to view the Windows event log of a remote machine (target is Windows2003). With mmc.exe I can add the event log for a remote machine, but only if I have sufficient permissions. For this remote machine, they do not want to give me permissions to log in remotely (or admin privileges for that matter). Is ...

Diagnosing CLR errors in Windows Event Viewer

We have an .NET desktop application that crashed in production. How do we diagnose the error? I'd like to know the type of exception that occurred, the error message, and the stack trace. Because the exception wasn't handled by our code, we received the "This application has encountered a problem and needs to close" Windows message box....

Write to eventlog from within Sharepoint webpart

Hello All, I'm trying to create a custom webpart. To implement error handling I would like to write to the eventlog. To do so, I'm trying to use the following code; protected void btnExceptionTester_Click(object sender, EventArgs e) { try { throw new Exception("this is a test"); } catch (...

Unique EventId generation

I'm using the Windows Event Log to record some events. Events within the Windows Event Log can be assigned a handful of properties. One of which, is an EventID. Now I want to use the EventId to try and group related errors. I could just pick a number for each call to the logging method I do, but that seems a little tedious. I want the...

How to get EventLog to record user name into Window Event Log?

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")) {...

Event Log Application Error, is the fault address meaningful?

I have an application error in the event log and it includes the following information: Reporting queued error: faulting application w3wp.exe, version 6.0.3790.3959, faulting module kernel32.dll, version 5.2.3790.4480, fault address 0x0000bef7. In general: Is the fault address useful in tracking down the issue? In particular: I have f...

Any light for TEventLogger?

I want to see about logging events from a Delphi 5 application to the Windows log, and from another post here I see that I can use the TEventLogger class to do this. However, I can't find any documentation on the syntax of the TEventLogger.LogMessage procedure, so I don't know what all the parameters mean, how to use them, or even what ...

Reading Windows events on XP the time is out by 1 hour, reading Vista the time is correct

When reading the date and time a Windows event occurred using XP the time is +1 hour out, when using Vista the time is correct. Both machines have .Net 3.5 installed (same version 3.5.30729.01), the time zone is the same and the time correct, both have the Daylight savings checked. If I run my program on Vista and read the XP event log...

way to "reverse" dw20.exe hashes?

Our application has been throwing unhandled exceptions. DW20.exe logs these like this test case: EventType clr20r3, P1 clr20r3.exe, P2 1.0.0.0, P3 4af175d6, P4 clr20r3, P5 1.0.0.0, P6 4af175d6, P7 1, P8 a, P9 system.applicationexception, P10 NIL. P9 is the name of the exception. If the exception name is over 32 characters long, DW20.e...

How to collect the new "Applications and Services Logs" found on Windows 7 or Windows Server 2008 using WMI?

In Windows Server 2008 and Windows 7 there are new Events categorized under "Applications and Services Logs". There is also a subfolder called Microsoft which has tons of subfolders as well. Is there any way to collect these events through WMI? For the regular "Windows Logs" such as Application and Security, it is possible to use the Wi...

Event Log in VBA

Is there an easy way to write to and read from the windows event log in VBA? ...

ASP.NET application not logging to the windows event log

I have two ASP.NET MVC web applications. One of them logs unhandled exceptions to the windows event log. The other doesn't. Is there a setting in IIS or the web.config to enable event log logging? Apologies for the broad question, I'm really looking for avenues for investigation. ...

Unable to retrieve the complete description string of the event log record

Hi All, I have an MFC application that reads and displays event log records using the ::ReadEventLog() API. The problem is with reading the "Description" message string of the event log record. The MFC application is unable to read the complete "Description" message string and displays only some part of it. However the Windows System Ev...

How to write to a custom event log?

Hi I'm trying to get my .Net Windows Service to right to a custom event log. I'm using EventLogInstaller to create the event log and source when the application is installed. I read here that it takes a while for Windows to register the source so they reccomend you restart the application before trying to write to the log. As this is ...

Event Log Oldest Record Number

I'm trying to use the new event log API to get the oldest record number from a windows event log, but cannot get the the API to return the same answer as event viewer displays (looking at the details EventRecordID). Some sample code I'm using is below: EVT_HANDLE log = EvtOpenLog(NULL, _logName, EvtOpenChannelPath); EVT_VARIANT buf; DW...

Writing exceptions in multihreaded windows service to event log

I have a multithreaded windows service that will unpredictably stop running once every 24 hours or so. I am writing to the event log and that's going through just fine, but whenever the service crashes there are no messages in the event log (even that the service stopped, despite having AutoLog=true). Is there a way to have uncaught exce...

How do I log a general exception to the Event Log?

I have a windows service, in which I want a top level try-catch that catches any otherwise unhandled (or bubbled) exception, logs it to the Event Log and then swallows it so the service keeps running. However, I can't find any overload to System.Diagnostics.EventLog.WriteEntry that takes an exception as a parameter - is there no way to j...

Is there any open-source Windows Event-Log analyzer application?

Hi, It's my daily routine to check and view my server's Event Log. Is there any application to analyze the Windows Event Log and send me notification or report? I saw many Commercial application when I was googling like Splunk , but any idea about open source desktop application? Thanks ...

Reliably get Latest Event Log Record with WQL

Hi All, I have written an application which collects windows logs from linux, via the Zenoss wmi-client package. It uses WQL to query the Event log and parses the return. My problem is trying to find the latest entry in the log. I stumbled across this which tells me to use the NumberOfRecords column in a query such as this Select ...

troubling anonymous Logon events in Windows Security event log

I have a dedicated server hosted on Rackspace Cloud, and this morning as I was casually checking the Security event log, I saw a series of successful Logon events that are troubling. It appears random IPs are successfully "logging in" to my server somehow. How is this possible? I have a very strong Administrator password. Am I overre...