dear Winhost, I've read the post on same subject but decided deliberately to open a new one. my development environment: W7ULT64, VS2008, MySQL 5.1.53 winx64, net connector 6.3.5 I guess I have tried every possible combination for DLLs, assemblies, DBfactories (web.config, .bin) and still get below error. All runs fine on my development machine! Also, I'm able to access the 'MySql' DBs using Workbench. For info; also the ASPNETDB (MS Sql) works just fine! On my machine I do NOT NEED to have MySql.Data.dll, MySql.Data.Entity.dll, MySql.Web.dll in the BIN folder NOR have the MySql assemblies (in web.config) active! BUT again: I tried probably all possible combinations of these elements on Winhost! ????? Can anyone from Winhost check this out and advise me !?!? thanks for your time ed ERROR: Unable to find the requested .Net Framework Data Provider. It may not be installed [ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.] System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1312703 System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactory() +67 System.Web.UI.WebControls.SqlDataSource.GetDbProviderFactorySecure() +22 System.Web.UI.WebControls.SqlDataSource.CreateConnection(String connectionString) +11 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +89 <remove name="asgbConnectionString" /> <add name="asgbConnectionString" connectionString="Data Source=my01.Winhost.com;Initial Catalog=mysql_11111_xyz;User ID=xyz;Password=xyz; Integrated Security=False;" providerName="MySql.data.MySqlClient" /> <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="Data Source=tcp:s01.Winhost.com;Initial Catalog=DB_11111_aspnetdb;User ID=DB_11111_aspnetdb_user;Password=xyz; Integrated Security=False;" providerName="System.Data.SqlClient" /> <DbProviderFactories> <clear /> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=6.3.5.0, Culture=neutral,PublicKeyToken=c5687fc88969c44d"/> </DbProviderFactories> <add assembly="MySql.Data, Version=6.3.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" /> <add assembly="MySql.Data.Entity, Version=6.2.2.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" /> <add assembly="MySql.Web, Version=6.3.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D" />
The MySQL Connector version you are looking for does not match the version we have installed on our server. Currently we have version 6.2.3 installed on our server not version 6.3.5 http://support.Winhost.com/KB/a835/mysql-connectnet.aspx
Hi Ray, thanks since I'm using Winhost since two days ... where would I have found that? Anyway, with 6.2.3.0 for the connector in DBproviderfactory the 'unable to find error is gone, HOWEVER, (see error below; I have 4 assemblies in my web.config with PublicKeyToken=b77a5c561934e089' ) ? Is this something Winhost has to change ? Thanks for your time and advise ed now I get:Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Increase the trust level on your application. Refer to this kb article. http://support.Winhost.com/KB/a657/changing-the-default-aspnet-trust-level.aspx
Hi Ray, thanks a million. All is fine now. My apologies for not reading all the knowledge base articles - yet! Thanks for your time and patience ed
Connector 6.2.3 Where do I find the 6.2.3 connector installer? MySQL in their previous versions page only has 6.2.4 which I assume is because that is the recommended version in 6.2.x
Try using this link to find an older version of MySQL connector/net. http://dev.mysql.com/doc/refman/5.1/en/connector-net-news.html
Final Solution Hi Ray, I was unable to find a download from the link above. However, I did manage to use the 6.3.5 connector by doing the following which is just a recap of the above: 1) Copied the following files to the bin folder from the 6.3.5 package to the bin directory of the application on the server: - MySql.Data.dll - MySql.Data.Entity.dll - MySql.Web.dll 2) Added the following to my webconfig (I did not have a system.data node in the file): <configuration> <system.data> <DbProviderFactories> <clear /> <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,Version=6.3.5.0, Culture=neutral,PublicKeyToken=c5687fc88969c44d"/> </DbProviderFactories> </system.data> </configuration> 3) Added the following to the webconfig (I did already have a system.web node in the file): <configuration> <system.web> <trust level="Full" /> </system.web> </configuration>
That is correct. The MySQL .net connector is Bin deployable and you could have used any version of the MySQL .Net connector so long as you upload it to your applications Bin folder and have your application reference it from there.