https://stackoverflow.com/questions/9564420/the-source-was-not-found-but-some-or-all-event-logs-could-not-be-searched

EventLog.SourceExists enumerates through the subkeys of HKLM\SYSTEM\CurrentControlSet\services\eventlog to see if it contains a subkey with the specified name. If the user account under which the code is running does not have read access to a subkey that it attempts to access (in your case, the Security subkey) before finding the target source, you will see an exception like the one you have described.

The usual approach for handling such issues is to register event log sources at installation time (under an administrator account), then assume that they exist at runtime, allowing any resulting exception to be treated as unexpected if a target event log source does not actually exist at runtime.

需要进行两次授权

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\  这个层级的授权会包含subkey的自动授权(但是不会包含security这个subkey除外)

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security

application pool can not write to event log的更多相关文章

  1. Recycling Settings for an Application Pool <recycling>

    Overview The <recycling> element contains configuration settings that control the conditions t ...

  2. 如何在Windows 2003+IIS6的环境下找回应用程序池(application pool)中的服务账号密码

    上一篇文章说了说如何在Win2008+iis7中取出SharePoint管理账号密码的方法. 整个过程简单的讲,就是通过使用要找回密码的账号用来在SharePoint中创建一个临时的Web Appli ...

  3. IIS7 Application Pool Integrate Mode 和 Classic Mode 的区别

    IIS7也用了好久了,关于Application Pool Integrate Mode 和 Classic Mode 究竟是什么也是懵懵懂懂,于是下决心去官网看了技术文档,终于恍然大悟,特来分享一下 ...

  4. Application Pool Identities

    Whether you are running your site on your own server or in the cloud, security must be at the top of ...

  5. ora-28056 (Writing audit records to Windows Event Log failed)

    系统:windows xp oracle 版本 SQL> select * from v$version; BANNER ------------------------------------ ...

  6. How do I create an IIS application and application pool using InnoSetup script

    Create an IIS application. Create a new IIS application pool and set it's .NET version to 4. Set the ...

  7. 排错技能:任务管理器中追踪某w3wp.exe是哪个IIS站点的application pool

    如果Windows的任务管理器中发现某个w3wp.exe占用了100%CPU,那我们就要揪出这是那个网站的application pool在作怪, 首先,每个站点一定要单独使用各自的applicati ...

  8. 批量启动application pool

    在powershell中执行 Get-ChildItem IIS:\AppPools | where {$_.state -eq "Stopped"} | Start-WebApp ...

  9. SharePoint Error occurred in deployment step 'Recycle IIS Application Pool': 0x80070005:拒绝访问

    错误出现的前提:多个用户在一台机器上做开发,使用非系统管理员账号时会出现,因为一般创建网站集时指定管理员为系统管理员: 使用 Visual Studio 2010 部署时报错:Error occurr ...

随机推荐

  1. JVM难学?那是因为你没认真看完这篇文章(转)

    一:虚拟机内存图解 JAVA程序运行与虚拟机之上,运行时需要内存空间.虚拟机执行JAVA程序的过程中会把它管理的内存划分为不同的数据区域方便管理. 虚拟机管理内存数据区域划分如下图: 数据区域分类: ...

  2. linux下安装oracle sqlplus以及imp、exp工具

    一.下载oracle 11g sqlplus软件 linux 64位操作系统,oracle安装包地址 http://www.oracle.com/technetwork/topics/linuxx86 ...

  3. 编写高质量代码--改善python程序的建议(一)

    原文发表在我的博客主页,转载请注明出处! 初衷 python是一个入门十分容易的编程语言,但是想要写好python却是一件不容易的事情,如果不是专业使用python的人,只是将python作为一个脚本 ...

  4. python中的json和pickle

    author:headsen chen date::2018-04-10  09:56:54 json模块和pickle模块: 这是用于序列化的两个模块: 概念介绍:json和pickle模块是将数据 ...

  5. shared_ptr & weak_ptr

    shared_ptr <1> 类模板说明 namespace boost { class bad_weak_ptr: public std::exception; template< ...

  6. Kubernetes资源创建yml语法

    前言 在是用kubernetes中,我们对资源的创建大部分都是通过 1 kubelet create -f RESOURCE.yaml 刚开看的时候不免有一些迷茫,看不懂语法,不知道怎么写:今天本文就 ...

  7. Spoken English Practice( Nobody have the guts to tell Paul what a mistake he was taking.(call,come,gut,fortune,when it comes to))

    音标复习 绿色:连读:                  红色:略读:               蓝色:浊化:               橙色:弱读 口语蜕变(2017/6/24) If your ...

  8. PHP下SESSION无法跨页传递的解决

    修改PHP.ini1.Windows下PHP的session文件保存路径要设置成为一个绝对路径session.save_path = C:\windows\temp2.为temp设置权限,允许User ...

  9. ORA-08002: sequence TESTTABLE1_ID_SEQ.CURRVAL is not yet defined in this session (未完全解决)

    说明: 断开连接后 重新连接执行序列号当前值查找 会报错. 解决方法一:先查询序列号下一个值 SELECT testTable1_ID_SEQ.nextval from dual;

  10. 第18章—后端分页(Mybatis)

    spring boot 系列学习记录:http://www.cnblogs.com/jinxiaohang/p/8111057.html 码云源码地址:https://gitee.com/jinxia ...