Server Error in '/' Application.

The ConnectionString property has not been initialized.

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 ConnectionString property has not been initialized.

Source Error:


Line 24:   adap = new SQLDataAdapter (consulta, conexion)
Line 25: 
Line 26:   adap.fill (dSet)
Line 27: 
Line 28:   ejecutarSQL = dSet

Source File: E:\Inetpub\wwwroot\avalsgr\noticias-detalle.aspx    Line: 26

Stack Trace:


[InvalidOperationException: The ConnectionString property has not been initialized.]
   System.Data.SqlClient.SqlConnection.PermissionDemand() +7152305
   System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +32
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +315
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +128
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +265
   System.Data.SqlClient.SqlConnection.Open() +133
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +182
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +180
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +126
   ASP.noticias_detalle_aspx.ejecutarSQL(String consulta, SqlConnection conexion) in E:\Inetpub\wwwroot\avalsgr\noticias-detalle.aspx:26
   ASP.noticias_detalle_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in E:\Inetpub\wwwroot\avalsgr\noticias-detalle.aspx:54
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


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