EventLog permission failing in ASP.Net on Win7

痞子三分冷 提交于 2019-12-06 03:50:06

This link appears to discuss the issue you are having. I am not sure about the differences between the default CAS (code access security) on XP vs. win 7, however the assembly writing to the event log (and all calling assemblies) must have EventLogPermission.

You can add the AllowPartiallyTrustedCallers attribute or sign the assembly with a strong name key.

If you are writing to the default Application log you need to provide permisson to the LocalSystem before using it inside app pool. Open RegistryEdit and goto

 HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\eventlog\Application

RightClick over the Applicatuion and click permissions

If the user(LOCALSYSTEM) is not present in the list then Add and Allow full Control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!