Here is how to do it:
1. place your log4net.config file in root directory
2. modify Global.asax.vb file > Application_Start method
Private Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
If Config.GetSetting("ServerName") = "" Then
ServerName = Server.MachineName
Else
ServerName = Config.GetSetting("ServerName")
End If
Dim path as String = HttpContext.Current.Server.MapPath("~/log4net.config")
If File.Exists(path) Then
log4net.Config.XmlConfigurator.ConfigureAndWatch( new FileInfo(path))
End If
End Sub
That is it. You can start logging or looking at the logs of let's say NHibernate