Server Error in '/' 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 628:                if (connection != null)
Line 629:                {
Line 630:                    command.Dispose();
Line 631:                    connection.Close();
Line 632:                    connection.Dispose();

Source File: e:\inetpub\vhosts\inlaksbudhranihospital.com\httpdocs\App_code\DLL\SqlHelper.cs    Line: 630

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   IQSPL.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String commandText, CommandType commandType, Dictionary`2 commandParameters) in e:\inetpub\vhosts\inlaksbudhranihospital.com\httpdocs\App_code\DLL\SqlHelper.cs:630
   IQSPL.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, String commandText, CommandType commandType) in e:\inetpub\vhosts\inlaksbudhranihospital.com\httpdocs\App_code\DLL\SqlHelper.cs:462
   Imp_HighlightsServices.GetDetailHighlights() in e:\inetpub\vhosts\inlaksbudhranihospital.com\httpdocs\App_code\BLL\Imp_HighlightsServices.cs:60
   highlights.Fillgrid() in e:\inetpub\vhosts\inlaksbudhranihospital.com\httpdocs\highlights.aspx.cs:21
   highlights.Page_Load(Object sender, EventArgs e) in e:\inetpub\vhosts\inlaksbudhranihospital.com\httpdocs\highlights.aspx.cs:15
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


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