HI!!! The problem(I think) is that you GET(GetLogger) the logger before set the name and load the config...
Try to do declare the loger like: private static log4net.ILog _pLog
and then in the Application_Start do:
void Application_Start(object sender, EventArgs e)
{
// Set logfile name and application name variables
log4net.GlobalContext.Properties["LogName"] = GetType().Assembly.GetName().Name + ".log";
log4net.GlobalContext.Properties["ApplicationName"] = GetType().Assembly.GetName().Name;
// Load log4net configuration
System.IO.FileInfo logfile = new System.IO.FileInfo(Server.MapPath("log4net.config"));
log4net.Config.XmlConfigurator.ConfigureAndWatch(logfile);
//Get the loger
_pLog = log4net.LogManager.GetLogger("Global.asax");
// Record application startup
pLog .Debug("Application startup");
}
so the secuence is:
// Set logfile name and application name variables
// Load log4net configuration
// get the logger
// Record application startup
please Apology my english. i speek spanish in realy...:P
Saludos