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

Source Error:


Line 71:     string GetIDByName(string file)
Line 72:     {
Line 73:         return MainClass.DBConnector.Vrednost("SELECT ID FROM Places WHERE URL='" + file.Remove(file.IndexOf(".aspx")) + "'");
Line 74:     }
Line 75:     string GetCityIDByName(string city_name)

Source File: c:\Websites\touriststreet318\touriststreet.com\Global.asax    Line: 73

Stack Trace:


[Exception: The connection was not closed. The connection's current state is open.]
   DB.SQLConnector.Vrednost(String sql) +211
   ASP.global_asax.GetIDByName(String file) in c:\Websites\touriststreet318\touriststreet.com\Global.asax:73
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in c:\Websites\touriststreet318\touriststreet.com\Global.asax:65
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433