There are many ways to write a log in asp.net
- using Application_Error event in global.asax (Here you need to create the Logs_App and logs_Error folders in your project, It creates one log file on an hourly basis, one for Activities and one for Errors. check
this[
^]
- using Event Log, (use EventLog class and you can write log in system event log see
this[
^])
- Using a plain text file
- Using database