创建EnvetLog时的SecurityException [英] SecurityException when create a EnvetLog

查看:58
本文介绍了创建EnvetLog时的SecurityException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我正试图在Windows事件查看器中创建日志源

我使用此代码只是为了开源:

hello I'm trying to create log source at the windows event viewer
I use this code just to open source :

System.Diagnostics.EventLog.CreateEventSource("LiorSprot.com", "LiorSprot");





我得到这个例外:



and I get this the exception :

"Source was not found, but could not search some or all event logs. Logs not accessible: Security."



我在本地主机中运行asp应用程序。



问题可能是我没有得到许可。但是......我如何给予许可?也许运行管理员模式?



请帮助:)


I run the asp applictaion in local host.

The problem is probably that I have no permission. But... how do I give permission? Maybe run administrator mode?

please help :)

推荐答案

这可能对你有所帮助



http://support2.microsoft.com/kb/2028427 [ ^ ]



'g'
This may help you

http://support2.microsoft.com/kb/2028427[^]

'g'


我在过去的回答中解释了使用自定义事件源的模式:如何在文件夹下创建事件日志 [ ^ ]。



-SA
I explained the pattern of using custom Event Source in my past answer: How to create event log under a folder[^].

—SA


这篇关于创建EnvetLog时的SecurityException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆