event-log

How to troubleshoot .NET 2.0 Error Reporting messages in the event log?

孤人 提交于 2019-12-18 10:30:15
问题 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 Computer: removed this Description: EventType clr20r3, P1 evemon.exe, P2 1.2.7.1301, P3 49ea37c8, P4 system.windows.forms, P5 2.0.0.0, P6 4889dee7, P7 6cd3, P8 18

How To Disable .NET Event Log Warnings?

你说的曾经没有我的故事 提交于 2019-12-18 06:31:11
问题 Per our policy we are no longer allowed to write to event log, so I removed all my event log code from writing to the event log, which works, however I keep getting random ASP.NET 4.0 Warnings from the errors, even though I have code in my Application_Error to handle all errors. Any way to disable event logging completely, maybe a web.config change or IIS setting to disable it? Noticing it for a lot of errors too.. not just my HTTPHandler Example of the EventLog record: Event code: 3005 Event

How to create a .NET event log source using WiX

痞子三分冷 提交于 2019-12-17 19:15:58
问题 This is an intentional semi-duplicate of How do you create an event log source using WiX and WIX: Create EventSource using .NET message file. My first question is, does it really have to be so complicated? Isn't there some way to simply specify to WiX, "my program is a .Net program, and it needs to write to the event log - please do the necessary setup"? OK, assuming that isn't possible, I'd like to receive any recommendations for the necessary WiX statements to make it work, irrespective of

What do I need to change to allow my IIS7 ASP.Net 3.5 application to create an event source and log events to Windows EventLog?

▼魔方 西西 提交于 2019-12-17 07:14:25
问题 ASP.Net 3.5 running under IIS 7 doesn't seem to allow this out of the box. if (!EventLog.SourceExists("MyAppLog")) EventLog.CreateEventSource("MyAppLog", "Application"); EventLog myLog = new EventLog(); myLog.Source = "MyAppLog"; myLog.WriteEntry("Message"); 回答1: This is part of windows security since windows 2003. You need to create an entry in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application Make sure that network service or the account you

How do you create an event log source using WiX

霸气de小男生 提交于 2019-12-17 04:29:49
问题 I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation. Does anyone know the best way to do this using the WiX framework. 回答1: Wix has out-of-the-box support for creating event log sources. Assuming you use Wix 3, you first need to add a reference to WixUtilExtension to either your Votive project or the command line. You can then add an EventSource element under a component : <Wix

Service installation fails as event source already exists

眉间皱痕 提交于 2019-12-14 03:00:34
问题 I'm trying to configure a Topshelf-based Windows service to log to a custom event log using Topshelf.Log4Net and log4net. This works fine if I run the application in command-line mode. When I try to install the service with BillsTestService.exe install , I get: INFO Topshelf v3.1.107.0, .NET Framework v4.0.30319.18052 DEBUG Attempting to install 'BillsTestService' Running a transacted installation. ... Service BillsTestService has been successfully installed. Creating EventLog source

What is event logging? and how do I write an event log file?

不打扰是莪最后的温柔 提交于 2019-12-13 17:45:08
问题 What is event logging? and how do I write an event log file for an application? I want to log all the activities of the application including when it uses a .dll, etc. and also show information of the application. 回答1: There is a good article on CodeProject.com that should give you the information you need to understand and use the Windows event log. http://www.codeproject.com/KB/system/xeventlog.aspx If you don't want to use the Windows event log and log to a text file, etc then take a look

Programmatically get last boot/shutdown time

泄露秘密 提交于 2019-12-13 16:23:31
问题 I'd like to get the exact time when windows was shut down and booted. In c++ I'd simply use GetTickCount64 which retrieves the number of milliseconds that have elapsed since the system was started (thus obtaining the time by difference), but I don't know if there is an equivalent function for python and, if possible, I'd like to avoid to write a c++ module. For last shutdown time I have no idea...maybe there is some log somewhere in windows? I tried to read the event log using win32evtlog

What is the simplest way to query event logs for message contents in C#?

纵饮孤独 提交于 2019-12-13 15:03:03
问题 I'm interested in writing some code to query the Windows Event Log for specific error message contents , as described in this MSDN article. However, I'm not a big fan of the mechanic of basically hand-rolling XPATH or a custom event view in the code...is there a simpler way of doing this? A LINQ provider perhaps? 回答1: You can create a custom view in Event Viewer and copy the generated XML. The schema is exactly the same. The other option is to read the events one at a time and check their

Write in Windows-Eventlog with Delphi Event-ID not found

拥有回忆 提交于 2019-12-13 09:51:28
问题 I am writing a Service application for Windows in Delphi. On some events I write messages to the Windows EventLog. That works, but there is the following text in every log entry: The description for Event ID xxx from source yyyyy cannot be found... I don't want this. What I have done: generate an ResouceEventlog.mc with this content: SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS Informational=0x1:STATUS_SEVERITY_INFORMATIONAL Warning=0x2:STATUS_SEVERITY_WARNING Error=0x3:STATUS_SEVERITY