event-viewer

Xampp - Apache Shuts Down Unexpectedly, Empty Log File And No Events

不想你离开。 提交于 2020-03-21 10:59:29
问题 I have XAMPP installed on my machine. I am trying to run Apache from the XAMPP Control Panel. I start the XAMPP Control Panel by right-clicking the shortcut and selecting "Run as administrator" (I am logged in on an account with Administrator privileges). The Control Panel starts up and everything appears to be in order (no error messages/warnings). When I click the Start button next to Apache I get the following error message: 2:22:44 PM [Apache] Attempting to start Apache app... 2:22:45 PM

WinAPI ReportEvent - component not installed

梦想的初衷 提交于 2019-12-24 07:28:09
问题 I've implemented a simple function to log on event viewer from my application. However, I'm getting the following message every time I log something, regardless the error level: The description for Event ID 0 from source MyAppEvents cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display

Source name when writing to event viewer C#

故事扮演 提交于 2019-12-12 05:07:27
问题 How do you change the source name when writing to the event viewer in C# language? Currently have this string cs = "Application"; if (!EventLog.SourceExists(cs)) EventLog.CreateEventSource(cs, "ReceiveDaily"); EventLog.WriteEntry(cs, message.Message, EventLogEntryType.Error); If I change CS to anything else, I see a Security-Kerberos (0x7) popping up at my event viewer It writes the error in the errorlog when I put "Application" though. But then the source is "Application", which isn't a very

Filtering events in Event Viewer using a regex

情到浓时终转凉″ 提交于 2019-12-11 04:06:24
问题 I have an event log with thousands of events. I want to make a custom filter or view which shows some of them. I want to filter them using a regex (or even just simple text match) on either the entire text of the XML (as text), or on a particular field. Event viewer does support ctl+f finding, but apparently you can't put that same find action into a custom view so it could be used every time. Environment: Microsoft windows server 2012 standard Program: event viewer I've looked at creating a

Open event viewer from a certain node

◇◆丶佛笑我妖孽 提交于 2019-12-10 21:24:10
问题 What is the command to open windows event viewer displaying a particular node details? For example if I simply use eventvwr command; it opens the UI with Root Node selected. I want Application node selected when it is opened OR any other node. Can it be configured programatically? Thanks. 回答1: To view the eventvwr.exe arguments simply type: eventvwr /? To specifically open the Application log use the command below: eventvwr computername /l:"%SystemRoot%\System32\Winevt\Logs\Application.evtx"

How to remove and create log in Windows Event Viewer

老子叫甜甜 提交于 2019-12-10 19:16:40
问题 I have an app. I'm trying to write log in Windows Event Viewer when its crashing. I found Write to Windows Application Event Log and I'm using DispatcherUnhandledExceptionEventHandler for catching unhandled exception. I'm setting it in constructor of app like: DispatcherUnhandledException += MyApplication_DispatcherUnhandledException; and write log like this: using (EventLog eventLog = new EventLog("Application")) { eventLog.Source = "Application"; eventLog.WriteEntry(exceptionMessage,

Windows Event Viewer holds a lock on my EXE file

依然范特西╮ 提交于 2019-12-10 04:23:06
问题 I'm curious about something. I'm developing a Windows service and log all the diagnostic events into the Windows Event Log. So when the service is running I open the Event Viewer (from Administrative tools) to view the results of my service's operation. This works great except for the moment when I need to uninstall my program (again, for the testing purposes.) For some weird reason the Event Viewer holds a lock on the .exe image file for my service so the uninstaller fails to delete it with

How to audit failure events for Windows security eventlog in C#

不打扰是莪最后的温柔 提交于 2019-12-08 13:43:33
问题 i need to access Audit Failure under Window log -> Security event instantly when it logs, is there any way to capture it instantly when it logs. i need to access real time attempts. currently i am reading this from EventLogEntry class in c#, but i need a my application to run when Audit Failure occurs. foreach (EventLogEntry entry in log.Entries) { if (entry.EntryType==EventLogEntryType.FailureAudit) { /// } } some thing similar to: EventLog myNewLog = new EventLog(); myNewLog.Log =

Trigger powershell based on event log

风流意气都作罢 提交于 2019-12-08 02:20:13
问题 I have a command line argument script written in PowerShell which accepts server name from the task scheduler. However my requirement is to execute the script when the SQL server is restarted, hence I have attached the PowerShell script to the event 17069. But I am unable to dynamically pass the event source which would be the server name in this case. Below is argument section of the task scheduler job -Command "& 'D:\SQLJobs\PS\readErrorLogFile.ps1' '$(Source)'" $(Source) does not pick up

SqlDependency subscription not dropped from dm_qn_subscriptions on shutdown

点点圈 提交于 2019-12-04 14:38:38
问题 My SqlDependency works fine, and the Broker Queue and Service get dropped properly when the application exists (I do execute SqlDependency.Stop(...) as recommended before terminating the process), yet I notice that the notification subscription created by the SqlDependency lives on in the table "sys.dm_qn_subscriptions" after the application shuts down. If I later (post-app shutdown) execute the condition that ought to make this subscription fire, it does seem to fire, as SQL Server logs an