event-log

C# EventLog Inaccessible Log

心不动则不痛 提交于 2019-12-06 19:08:00
问题 Below is an exception I encountered while running the immediately following code: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security. The code is if (!EventLog.SourceExists(this.EventLogSource)) The content of the exception makes sense to me, it's why that doesn't. This line is running in Visual Studio 2010, .NET 4, as a console app ( for the time being ). I have run this in a different environment, but I wouldn't expect the fact that I'm

Silverlight Event Log in Isolated Storage

允我心安 提交于 2019-12-06 16:32:39
Has anyone written an event log that uses Isolated Storage in Silverlight 3? Any suggestions on implementing one? Specific questions: Should I keep a stream writer open, or should I open,write, and close for each entry? How should I remove items from the log atomically? I heard clog from codeplex is pretty good although it targets wcf, i read on codeproject about about a log4net approach that works for silverlight, although both of these log 2 wcf services, im sure with a bit of tweaking you can modify this to write to isolated storage Crypto Logger supports Silverlight apps and libraries and

Get Windows event provider information

醉酒当歌 提交于 2019-12-06 13:42:45
I would like to retrieve information about event providers using Windows PowerShell? I'm running Windows 8.1 with PowerShell version 4.0, and I noticed that there are some .NET classes in the System.Diagnostics.Eventing namespace that offer some functionality around Windows eventing. I can create an EventProvider instance by calling its default constructor, however this does not allow me to get any information about the event providers installed on the system. $EventProvider = New-Object -TypeName System.Diagnostics.Eventing.EventProvider -ArgumentList ([System.Guid]'{00000000-0000-0000-0000

How to create NTEventlogAppender.dll as required for logging event in the eventlog using log4cplus

筅森魡賤 提交于 2019-12-06 11:39:05
问题 First, Let me thank for the log4cplus source code. I am facing one issue as follows: What I am trying to do? I want to log the messages to event log on windows. What did I do? I could get the event logging enabled by in including following .h #include <log4cplus/nteventlogappender.h> And creating the appender as follows: SharedAppenderPtr append_3(new NTEventLogAppender(LOG4CPLUS_TEXT("127.0.0.1"), LOG4CPLUS_TEXT("log"), LOG4CPLUS_TEXT("source"))); append_3->setName(LOG4CPLUS_TEXT("ToEventlog

Subscribe to Non System (Custom) Events in an Event Log

杀马特。学长 韩版系。学妹 提交于 2019-12-06 10:43:49
I want to raise an event whenever a new log entry is added to a particular event log file in windows event viewer. I am trying to do something similar to what is mentioned here. http://msdn.microsoft.com/en-us/library/bb671202.aspx Here is my code: static void Main() { EventLogWatcher watcher = null; try { EventLogQuery eventQuery = new EventLogQuery("C:\\Windows\\System32\\winevt\\Logs\\Admin.evtx", PathType.FilePath); EventLogReader logReader = new EventLogReader(eventQuery); DisplayEventAndLogInformation(logReader);// this successfully opens the log and shows all logged events. watcher =

Application error: fault address 0x00012afb (Expert)

白昼怎懂夜的黑 提交于 2019-12-06 10:39:51
I need some "light" to get a solution. Probably there are tons of things that cause this problem, but maybe somebody could help me. Scenario: a Windows server running 24/7 a PostgreSQL database and others server applications (for processing tasks on database, etc...). There are differents servers scenarios (~30), with different hardware and windows versions (XP SP3/ WinServer, etc... all NT based). All aplications were written in Delphi7, and link to DLLs (in D7 also). After some days (sometimes a week, sometimes a couple of months), Windows begins to act strange, like not opening start menu,

How to retrieve event log other than Application category?

。_饼干妹妹 提交于 2019-12-06 08:34:33
I'm trying to retrieve some event log in a category that is different from Application. For example, I want to get the info in "Microsoft-Windows-Application Server-Applications/Operational". Below it is my code EventLog log = new EventLog("Microsoft-Windows-Application Server-Applications/Operational"); int index = log.Entries.Count - 1; Debug.WriteLine(log.Entries[index].Message); But it always shows the error: The event log 'Microsoft-Windows-Application Server-Applications/Operational' on computer '.' does not exist. If I simply use "Application", then I can get the log in Application

PowerShell event log xml xpath select not working

核能气质少年 提交于 2019-12-06 06:11:35
Would anyone be able to tell my why the selects below don't work? I don't get errors. They just return nothing. The xml below is the actual event log item converted to xml. I only changed a few values to ensure not private info would be in this post. $Str represents output from a single event log item. i.e. $event.ToXml() . $str = @" <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" /> <EventID>4624</EventID> <Version>0</Version> <Level>0</Level> <Task>12544</Task>

Problem in accessing/writing to EventLog

给你一囗甜甜゛ 提交于 2019-12-06 04:04:40
问题 I'm working with some old code (and frankly I don't know half of what it does) trying to move it over to IIS7. One of the problems I see is that I get this error: [SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.] If I go manually to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security and set that key's (Security) permission to let "Everyone" have full access this goes away no problem. But obviously

EventLog permission failing in ASP.Net on Win7

痞子三分冷 提交于 2019-12-06 03:50:06
I have an ASP.Net app .net 3.5 SP1, running in Win7 . During the login process, something within the ASP.Net login control is causing a write to the security log (this sounds acceptable to me) in the event log. The problem is that it seems the app doesn't have permission to do this. There error is: Description : The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security