Tag: event log

源未find,但部分或全部事件日志无法search。 无法访问的日志:安全

我收到错误: 源未find,但部分或全部事件日志无法search。 无法访问的日志:安全 当我运行下面的代码来捕获Win 2K12 R2服务器IIS 8.5上的错误 EventLog elog = new EventLog(); EventLog.CreateEventSource("MyApp", "Application"); EventLog.WriteEntry(Source, swError.ToString(), EventLogEntryType.Error); 我已经完全访问HKLM\SYSTEM\CurrentControlSet\services\eventlog但它仍然不能正常工作。 我该怎么办才能解决这个问题?

源未find,但部分或全部事件日志无法search

我收到以下例外。 我已经完全控制了registry编辑中Eventlogs上的Asp.net帐户。 [SecurityException:未find源,但无法search部分或全部事件日志。 无法访问的日志:安全。] System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate) +664 System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate) +109 System.Diagnostics.EventLog.SourceExists(String source) +14 Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher.VerifyValidSource() +41 我猜这是由于服务器上的一些configuration问题?

如何使用WiX创build事件日志源

我正在为使用自定义事件日志源的网站创build安装程序。 我希望我们的基于WiX的安装程序在安装过程中创build该事件日志源。 有没有人知道使用WiX框架来做到这一点的最好方法。

找出用户名(谁)在C#中修改文件

我正在使用FileSystemWatcher来监视一个文件夹。 但是当目录中发生一些事件时,我不知道如何search谁对这个文件产生影响。 我试图使用EventLog。 它只是不能工作。 还有另一种方法吗?