Sunday, March 5, 2023

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

 

Create a registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\MY-AWESOME-APP

Create a string value inside this

Name it EventMessageFile, set its value to

C:\Windows\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll

That path appears to work in both 64 bit and 32 bit environments.

With this technique you don't need to set permissions in the registry, and once the key above is created it should just work.

Alternatively
f you don't have a large server farm but just a small "web garden" you could run a console application on each server that creates the event log source using EventLog.CreateEventSource, make sure the console application is run by an administrator.


Ref: https://stackoverflow.com/questions/286060/what-do-i-need-to-change-to-allow-my-iis7-asp-net-3-5-application-to-create-an-e/7848414#7848414

No comments:

Followers

Link