i have created log directory for errors in application_error() of global.asax page.
my code is as follows..
try
{
StackFrame callstack = new StackFrame(1, true);
int lineNo = callstack.GetFileLineNumber();
//string user = "User: " + Session["Username"].ToString();
string msg2 = "\n Line No: " + lineNo + "\nIP: " + IPAddress;
string strError = "\nError in: " + Request.Url.ToString() +
"\nError Message: " + objError.Message.ToString() +
"\nStack Trace: " + objError.StackTrace;
msg2 += strError;
string errorLogname = "ErrorSample";
if (EventLog.SourceExists(errorLogname) == false)
{
EventLog.CreateEventSource(errorLogname, errorLogname);
}
EventLog log = new EventLog();
log.Source = errorLogname;
log.WriteEntry(msg2, EventLogEntryType.Error, lineNo);
}
catch (Exception ex) { }
but the log directory with name ErrorSample is created in event viewer on windows xp poffessional ,
i want to it should be created on windows 2003 server,
i also tried it on win. 2003 server, bur it didnot created..
plz reply how to check log on windows 2003 serverr..