System.Security.SecurityException при записи в журнал событий

Я работаю над попыткой портировать приложение ASP.NET с Server 2003 (и IIS6) на Server 2008 (IIS7).

Когда я пытаюсь зайти на страницу в браузере, я получаю это:

Server Error in ‘/’ Application.

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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and the location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.]

System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) +562 System.Diagnostics.EventLog.SourceExists(String source, String machineName) +251

[snip]

Вот что я сделал, чтобы попытаться решить эту проблему:

Give “Everyone” full access permission to the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security. This worked. But naturally I can’t do this in production. So I deleted the “Everyone” permission after running the app for a few minutes and the error re-appeared.

I created the source in the Application log and the Security log (and I verified it exists via regedit) during installation with elevated permissions but the error remained.

I gave the app a full trust level in the web.config file (and using appcmd.exe) but to no avail.

Кто-нибудь знает, что можно сделать здесь?

PS: это продолжение этоговопрос, Я следовал за данными ответами, но безрезультатно (см. № 2 выше).

Ответы на вопрос(22)

Ваш ответ на вопрос