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 11: public partial class tc : System.Web.UI.Page
Line 12: {
Line 13:     SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con3"].ToString());
Line 14: 
Line 15:     protected void Page_Load(object sender, EventArgs e)

Source File: e:\inetpub\vhosts\nmpublicschool.com\httpdocs\tc.aspx.cs    Line: 13

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   tc..ctor() in e:\inetpub\vhosts\nmpublicschool.com\httpdocs\tc.aspx.cs:13
   ASP.tc_aspx..ctor() in e:\inetpub\vhosts\nmpublicschool.com\tmp\root\48403ac8\1ad7d295\App_Web_gwvxxscj.60.cs:0
   __ASP.FastObjectFactory_app_web_gwvxxscj.Create_ASP_tc_aspx() in e:\inetpub\vhosts\nmpublicschool.com\tmp\root\48403ac8\1ad7d295\App_Web_gwvxxscj.76.cs:0
   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +31
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +100
   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
   System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
   System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +339
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159


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