Server Error in '/' Application.

Object cannot be cast from DBNull to other types.

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.InvalidCastException: Object cannot be cast from DBNull to other types.

Source Error:


Line 26: 		if (Application["configDone"] == null)
Line 27: 		{
Line 28: 			youcommerce.config.storeConfig(); // setta variabili di applicazione
Line 29: 			Application["configDone"] = true;
Line 30: 		}

Source File: d:\home\h625459.winp033.arubabusiness.it\newavebellagio.com\Global.asax    Line: 28

Stack Trace:


[InvalidCastException: Object cannot be cast from DBNull to other types.]
   System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider) +56
   System.Convert.ToInt32(Object value, IFormatProvider provider) +31
   MySql.Data.MySqlClient.Driver.LoadCharacterSets() +314
   MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection) +343
   MySql.Data.MySqlClient.NativeDriver.Configure(MySqlConnection conn) +14
   MySql.Data.MySqlClient.MySqlConnection.Open() +338
   youcommerce.logicaDb.config.getConfig() +123
   youcommerce.config.storeConfig() +32
   ASP.global_asax.Application_PreRequestHandlerExecute(Object sender, EventArgs e) in d:\home\h625459.winp033.arubabusiness.it\newavebellagio.com\Global.asax:28
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975