Server Error in '/' Application.

The connection name 'test' was not found in the applications configuration or the connection string is empty.

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.InvalidOperationException: The connection name 'test' was not found in the applications configuration or the connection string is empty.

Source Error:


Line 40:                     DataValueField="course_name">
Line 41:                 </asp:DropDownList>
Line 42:                 <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
Line 43:                     ConnectionString="<%$ ConnectionStrings:test %>" 
Line 44:                     SelectCommand="SELECT [course_name] FROM [tb_course]"></asp:SqlDataSource>

Source File: d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\almuni.aspx    Line: 42

Stack Trace:


[InvalidOperationException: The connection name 'test' was not found in the applications configuration or the connection string is empty.]
   System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) +1561578
   ASP.almuni_aspx.__BuildControlSqlDataSource2() in d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\almuni.aspx:42
   ASP.almuni_aspx.__BuildControlContent2(Control __ctrl) in d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\almuni.aspx:5
   System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +15
   System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +90
   ASP.mainmasterpage_2_master.__BuildControlContentPlaceHolder1() in d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\mainmasterpage_2.master:387
   ASP.mainmasterpage_2_master.__BuildControlform1() in d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\mainmasterpage_2.master:385
   ASP.mainmasterpage_2_master.__BuildControlTree(mainmasterpage_2_master __ctrl) in d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\mainmasterpage_2.master:1
   ASP.mainmasterpage_2_master.FrameworkInitialize() in d:\Inetpub\vhosts\davcollegeasr.org\testdavasr.davcollegeasr.org\mainmasterpage_2.master.cs:912308
   System.Web.UI.UserControl.InitializeAsUserControlInternal() +37
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +697
   System.Web.UI.Page.get_Master() +56
   System.Web.UI.Page.ApplyMasterPage() +15
   System.Web.UI.Page.PerformPreInit() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +302


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