Server Error in '/' Application.

The connection was not closed. The connection's current state is open.

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 was not closed. The connection's current state is open.

Source Error:


Line 67:             dl_galeri.DataSource = dt;
Line 68:             dl_galeri.DataBind();
Line 69:             con.Open();
Line 70:             komut = new OleDbCommand("select * from tbl_urunler where urun_id=" + Request.QueryString["id"].ToString() + "", con);
Line 71:             OleDbDataReader drd = komut.ExecuteReader();

Source File: d:\vhosts\babainsaat.com\sahibindenklima.com\ilan_detay.aspx.cs    Line: 69

Stack Trace:


[InvalidOperationException: The connection was not closed. The connection's current state is open.]
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +20
   System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +19
   System.Data.OleDb.OleDbConnection.Open() +43
   ilan_detay.Page_Load(Object sender, EventArgs e) in d:\vhosts\babainsaat.com\sahibindenklima.com\ilan_detay.aspx.cs:69
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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