Creating an EventLog using ASP.NET


EventLog Creation using ASP.NET

Eventlog is used to log events that occurs in the lifetime of the application. A one point place for Support personnel/developer to look for information/issue regarding the application state.

Event logs could be created using .NET by using the System.Diagonostics namesage



using System.Diagonostics;



Creation of an Event Log is very simple, by using the EventLog class provided by .NET Framework.



public static void CreateLog()
{
EventLog objErrorLog = new EventLog("ECommerceErrorLog");
objErrorLog.Source = "ECommerceErrorLog";
objErrorLog.WriteEntry("Creat EcommerceErrorLog", EventLogEntryType.Information);
}


Comments

Guest Author: Pratik18 Sep 2013

Hi Chris, on your environment you might need to get a third party tool, inesatd this power shell script. I saw that some people use NetIq, that needs to deploy agents on every DC that you have deploy on your environment, and get all the security events consolidated into a central console, from where you can get all the information about user account lockouts. At the other hand, if you also have deployed SCOM on your environment you can use rules to catch up all your environment events, but let's consider that surely are going to be a bunch of them and a bunch of alerts coming through email Hope it helps.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: