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 15:     static public MySqlConnection GetConnection()
Line 16:     {
Line 17:         MySqlConnection oSqlConnection = new MySqlConnection(ConfigurationManager.ConnectionStrings["mysql"].ToString());
Line 18:         return oSqlConnection;
Line 19:     }

Source File: g:\pleskvhosts\diasdeareco.com.ar\httpdocs\App_Code\ado\MySQLConnection.cs    Line: 17

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   MySQLConnection.GetConnection() in g:\pleskvhosts\diasdeareco.com.ar\httpdocs\App_Code\ado\MySQLConnection.cs:17
   MySQLQuery.GetDataTable(String sQuery, Hashtable hParams) in g:\pleskvhosts\diasdeareco.com.ar\httpdocs\App_Code\ado\MySQLQuery.cs:28
   Entity.news.GetNewsHome(List`1 outstanding, List`1 idNewsExclude, Int32 idLanguage, Int32 limit) in g:\pleskvhosts\diasdeareco.com.ar\httpdocs\App_Code\entity\news.cs:577
   index.Page_Init(Object sender, EventArgs e) in g:\pleskvhosts\diasdeareco.com.ar\httpdocs\index.aspx.cs:17
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnInit(EventArgs e) +97
   System.Web.UI.Page.OnInit(EventArgs e) +14
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +416


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