I am writing an application using the c# and MySql database.
Everything worked find when I was developing the application on Windows 7 however, after the upgrade to Windows 10, the MySql kept throwing an exception:
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'MySql.Data.MySqlClient.MySqlConnectionStringBuilder' threw an exception.
Source=MySql.Data
TypeName=MySql.Data.MySqlClient.MySqlConnectionStringBuilder
StackTrace:
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor()
at MySql.Data.MySqlClient.MySqlConnection..ctor()
at MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString)
at QuickSales.Models.DBContext..ctor() in c:\Users\Sheldon\Documents\Visual Studio 2012\Projects\QuickSales\QuickSales\Models\DBContext.cs:line 22
at QuickSales.Controllers.EmployeesController..ctor() in c:\Users\Sheldon\Documents\Visual Studio 2012\Projects\QuickSales\QuickSales\Controllers\EmployeesController.cs:line 18
InnerException: System.AccessViolationException
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException:
Any help to resolve the error would be highly appreciated.
Sheldon.
Everything worked find when I was developing the application on Windows 7 however, after the upgrade to Windows 10, the MySql kept throwing an exception:
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'MySql.Data.MySqlClient.MySqlConnectionStringBuilder' threw an exception.
Source=MySql.Data
TypeName=MySql.Data.MySqlClient.MySqlConnectionStringBuilder
StackTrace:
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor()
at MySql.Data.MySqlClient.MySqlConnection..ctor()
at MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString)
at QuickSales.Models.DBContext..ctor() in c:\Users\Sheldon\Documents\Visual Studio 2012\Projects\QuickSales\QuickSales\Models\DBContext.cs:line 22
at QuickSales.Controllers.EmployeesController..ctor() in c:\Users\Sheldon\Documents\Visual Studio 2012\Projects\QuickSales\QuickSales\Controllers\EmployeesController.cs:line 18
InnerException: System.AccessViolationException
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException:
Any help to resolve the error would be highly appreciated.
Sheldon.