Trouble Writing to the Event Log from ASP.Net?

This Microsoft KB article offers some work arounds.

You’re not alone. The ASP.Net worker process account doesn’t have permission to create a new event log source. This Microsoft KB article offers some work arounds.

I’ve also had this same problem with Windows Service applications that try to write to the event log, so it would seem that the local service account doesn’t have permission to create an event source either (eventhough writing to the event log is such a common function of Windows Services that it is used as an example in the otherwise helpful tutorial from Microsoft!). Although I came up with another solution at that time (runing the code to write to the log once from a command line project while logged in as a user with the proper permissions), I’m sure the solutions in the above article would work, too.