An System.Collections.Generic.KeyNotFoundException “The given key was not present in the dictionary” can be the result of using a too old MySQL Connector/NET version in your ASP.NET web application.
This article provides you with a couple of ASP.NET to SQL Server connection string examples for ODBC and OLE DB. And as a bonus for ASP to SQL Server, MySQL, and SSL encrypted connections too.
Test MySQL database connectivity in ASP.NET, PHP, ASP; Simple MySQL connection test from your website with ASP.NET, PHP & classic ASP. Whenever you need a MySQL connectivity test from a website or server, it’s handy to have various test scripts nearby. Whether it is because you are setting up a new website or you have just installed a new server and are running your tests.
How to let MySQL Connector/NET, ASP.NET and Entity Framework play nicely. Set up and check your Web.config website configuration