Server Error in '/saaraweb' Application.

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 22: 
Line 23:             MasterBAL MasterBAL = new MasterBAL();
Line 24:             DataTable dtDistrict = MasterBAL.AllDistricts(seasonInfo);
Line 25:             if (dtDistrict != null && dtDistrict.Rows.Count > 0)
Line 26:             {

Source File: D:\GirdavariWeb\PublicReport\rpt_cropstatusdistrictwise.aspx.cs    Line: 24

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Girdavari.BAL.MasterBAL.AllDistricts(String seasoninfo) +1107
   PublicReport_rpt_cropstatusdistrictwise.Page_Load(Object sender, EventArgs e) in D:\GirdavariWeb\PublicReport\rpt_cropstatusdistrictwise.aspx.cs:24
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4069.0