We use a custom exception handler which utilizes the MS Enterprise Library
Exception Block. I recently had an ASP.NET page I was testing that failed a test
and I received “Inaccessible logs: Security Error” message.
Problem:
Root problem is the first time a ASP.Net application attempts to write to the
Event Log an exception type for that application is created. In this case the
Application Pool was running as the “NetworkService” identity.
Solution:
Simple fix is to change the identity that the Application Pool is running as
an identity that has administrative privileges. In this case, I switched the
identity to “LocalSystem”. Run the offending page again one time and the
exception’s event type is created, then switch the Application Pool’s Identity
back to “NetworkService”.