Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 22, 2012 01:24 AM by Lannie
Apr 20, 2012 08:26 AM|LINK
I have a big problem and i very confuse with mysql connector in medium trust using asp.net. I use the 6.5.4 version of the connector and my dlls are copied in the bin folder of the app (I have a hosting provider that not has the dll of the connector registered
in the GAC and run in medium trust)
The problem: I have a simple demo app in asp.net (vs2010) using framework 4 under medium trust. When I use the controls of asp.net and asp.net makes a connection automatically (with the connection of the webconfig) the connection to my mysql DB work fine. But
when I make the connection manually using this:
MySqlConnectionStringBuilder myconnString = new MySqlConnectionStringBuilder("Server=hostingproviderserver;Database=test;Uid=root;Pwd=test;");
MySqlConnection myconn = new MySqlConnection(myconnString.ConnectionString);
I receive a permission error:
"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."
The problem is that I use in the same app the two type of connection (manual and automatic) and I receive an error with a manual connection. All this in medium trust because if I test the app in a full trust environment, the two ways working OK. I need the
help of the community.
Thanks and Regards.
Apr 20, 2012 08:28 AM|LINK
Apr 20, 2012 08:32 AM|LINK
Are you sure that is the solution?,
you had the same problem?
Thanks and Regards
Apr 22, 2012 01:24 AM|LINK
Use Full Trust in your IIS settings.