EventLog el = new EventLog("Application");
el.Source = "my_src_name";
el.WriteEntry("오류 메시지", EventLogEntryType.Error);
다음과 같은 오류 발생
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
Source Error:
|
Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\license\3ebadbd0\51884812\App_Web_2wv6qvf1.0.cs Line: 0
Stack Trace:
|
해결방법
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog -> NETWORK SERVICE user에 Full Control 퍼미션 추가
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\my_src_name 키 직접 추가
'web' 카테고리의 다른 글
IIS8에 PHP설치 삽질기 (0) | 2015.08.21 |
---|---|
HTML반환 문자열에 의도하지 않은 공백과 개행문자가 추가된다? (0) | 2013.11.19 |
[ASP]http를 통해 특정 파일 다운로드가 안될때 (0) | 2010.06.18 |
2003서버의 ftp에 passive모드로 접근되지 않을 때 (0) | 2010.06.18 |
맨티스 charset 설치 (0) | 2009.08.08 |