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. 54、Android 粒子效果之雨(下雨的效果)

    核心内容: 1.绘制下雨场景的个体.雨点(直线) 2.让直线动起来 3.处理边界问题 4.构造雨点对象 5.雨点大小设置 6.速度设置和角度设置等 7.添加多个雨点 8.抽离可以在 XML 中影响的属 ...

  2. Codeforces Round #365 (Div. 2) D.Mishka and Interesting sum

    题目链接:传送门 题目大意:给n个数,m次询问,每次询问区间 l,r 内出现偶数次数的异或和 题目思路:前缀和+离线处理+树状数组 首先可以知道, l,r 内出现奇数次的数的和,就是把 l,r内所有数 ...

  3. 滚动插件 animatescroll(可以设置要滚动到位置)

     1. 引入   <script src="js/animatescroll.js"></script> 2.设置要滚动到的位置  $('目标位置').an ...

  4. 关于redux应用

    redux 有点类似flux.但是我觉得远比flux要复杂.因为他非常的绕.一般搭配使用是redux 和react-redux 使用. 主要的思路就是: 写action:动作类型 写reducer:动 ...

  5. 在Editplus中Dev C++配置C++的编译运行环境

    1.首先得下载安装DEV-cpp 2.打开Editplus编辑器,工具->配置自定义工具 3.具体配置 编译C:命令:D:\Dev-Cpp\MinGW64\bin\g++.exe参数:" ...

  6. IE11上登陆oracle OEM时报:“证书错误,导航已阻止”且无继续浏览此网站(不推荐)的错误

    问题原因:oracle oem证书的密钥小于1024 解决方案:在cmd中执行命令:certutil -setreg chain\EnableWeakSignatureFlags 8 出现以下提示: ...

  7. Java 常用语法和数据结构

    Collection 首先Java中的collection都是支持泛型和类型安全 由于Java单根继承, 所以不指定, 可以在collection里面放任何对象, collection会都当作obje ...

  8. 007-shiro与spring web项目整合【一】基础搭建

    一.需求 将原来基于url的工程改成使用shiro实现 二.代码 https://github.com/bjlhx15/shiro.git 中的permission_shiro 三.去除原项目拦截器 ...

  9. mysql 练习题(Day44)

    init.sql文件内容 /* 数据导入: Navicat Premium Data Transfer Source Server : localhost Source Server Type : M ...

  10. mysql的-F与master-data理解(一个小型的big-log恢复)

    例子: 使用mysqlbin-log恢复,有两种情况,一个是停数据库,一个是不停 在不停数据库的情况下,为了防止新的写入,需要将bin-log切割,然后新的数据会保存在新的bin-log里面 在此之前 ...