application pool can not write to event log
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的更多相关文章
- Recycling Settings for an Application Pool <recycling>
Overview The <recycling> element contains configuration settings that control the conditions t ...
- 如何在Windows 2003+IIS6的环境下找回应用程序池(application pool)中的服务账号密码
上一篇文章说了说如何在Win2008+iis7中取出SharePoint管理账号密码的方法. 整个过程简单的讲,就是通过使用要找回密码的账号用来在SharePoint中创建一个临时的Web Appli ...
- IIS7 Application Pool Integrate Mode 和 Classic Mode 的区别
IIS7也用了好久了,关于Application Pool Integrate Mode 和 Classic Mode 究竟是什么也是懵懵懂懂,于是下决心去官网看了技术文档,终于恍然大悟,特来分享一下 ...
- Application Pool Identities
Whether you are running your site on your own server or in the cloud, security must be at the top of ...
- ora-28056 (Writing audit records to Windows Event Log failed)
系统:windows xp oracle 版本 SQL> select * from v$version; BANNER ------------------------------------ ...
- 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 ...
- 排错技能:任务管理器中追踪某w3wp.exe是哪个IIS站点的application pool
如果Windows的任务管理器中发现某个w3wp.exe占用了100%CPU,那我们就要揪出这是那个网站的application pool在作怪, 首先,每个站点一定要单独使用各自的applicati ...
- 批量启动application pool
在powershell中执行 Get-ChildItem IIS:\AppPools | where {$_.state -eq "Stopped"} | Start-WebApp ...
- SharePoint Error occurred in deployment step 'Recycle IIS Application Pool': 0x80070005:拒绝访问
错误出现的前提:多个用户在一台机器上做开发,使用非系统管理员账号时会出现,因为一般创建网站集时指定管理员为系统管理员: 使用 Visual Studio 2010 部署时报错:Error occurr ...
随机推荐
- noip2006 金明的预算
题目链接:传送门 题目大意:略.. 题目思路:其实单就这道题来说,一个主件最多两个附件,且附件不再包含附件,所以很简单,但是如果主件的附件无限制,附件也可包含无限制的附件,应该怎么做? 首先推荐一篇论 ...
- 因为td设置relative导致td的border问题
在ff下因为td设置relative导致td的border问题:其实是个老问题了~碰到了拿出来记录下 td 中添加如下样式 background-clip: padding-box
- jquery的jsonp相关
<!DOCTYPE html><html><head ><meta charset="utf-8"><script src=& ...
- java如何遍历当月所有的日期?
转自:https://zhidao.baidu.com/question/360215274.html import java.util.ArrayList;import java.util.Cale ...
- Scala学习之Tuple、Map、Array
1.Tuple Tuple的中文意思是元组,它的定义是不需要方法. 例如:val tup=(25,”Tuple”,”Map”,”Array”). 值得注意的是,Tuple在进行索引的时候,与我们平时所 ...
- Storm的组件
摘自网上 当时写的很好,很详细的介绍了各个组件直接的关系 Storm集群和Hadoop集群表面上看很类似.但是Hadoop上运行的是MapReduce jobs,而在Storm上运行的是拓扑(topo ...
- Python菜鸟之路:Django 数据验证之钩子和Form表单验证
一.钩子功能提供的数据验证 对于数据验证,django会执行 full_clean()方法进行验证.full_clean验证会经历几个步骤,首先,对于model的每个字段进行正则验证,正则验证通过后, ...
- JQuery输入自动完成
Combogrid 是一个jQuery插件用于为输入框添加高级自完成功能(auto-complete).当用户输入的时候,会在输入框的下方面动态显示一个拥有分页功能 的表格(Grid)控件. 通过Aj ...
- numpy.random.random & numpy.ndarray.astype & numpy.arange
今天看到这样一句代码: xb = np.random.random((nb, d)).astype('float32') #创建一个二维随机数矩阵(nb行d列) xb[:, 0] += np.aran ...
- Redis2.8配置文件详解(转)
add by zhj : 没找到本文的原文.另外,redis配置文件中文翻译 也翻译的不错,可以与本文对照看.两篇文章都是以Redis2.8来介绍的 在Redis中直接启动redis-server服务 ...