Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 105: catch (Exception EX)
Line 106: {
Line 107: logger.Error("Error in bookApointmentClick in main Calender Booking Form " +EX.InnerException.ToString());
Line 108:
Line 109: }
I am getting a strange error when using log4net but in my web app its crashing saying object not created.
According to your description, i'm not sure what line of code you have caused the problem. So please debug your code and find the line caused this problem in your code.
Member
7 Points
62 Posts
Log4Net object reference not set ?
Mar 12, 2016 09:39 PM|david38ni|LINK
I am getting a strange error when using log4net but in my web app its crashing saying object not created. I am unitizing the logger with the following
Error
E
Star
8460 Points
1445 Posts
Re: Log4Net object reference not set ?
Mar 14, 2016 02:16 AM|Klein Zhang|LINK
Hi david38ni,
According to your description, i'm not sure what line of code you have caused the problem. So please debug your code and find the line caused this problem in your code.
It seems that the use method of the log4net is not right. You could refer to the following links to learn the correct way of using log4net.
http://stackoverflow.com/questions/7089286/correct-way-of-using-log4net
http://www.codeproject.com/Articles/140911/log-net-Tutorial
I hope it's helpful to you.
Best Regards,
Klein zhang