How to use EventLog in ASP.NET

First choose a log source name

Then write a console app that writes an entry using that source name, run the app as an administrator.

After that, you can use EventLog.WriteEntry(SOURCE_NAME, errorMessage,..) to write log messages.

Leave a Reply

Your email address will not be published. Required fields are marked *