Attempt to access the method failed.

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
GUYS
Posts: 2
Joined: Wed 22 Mar 2006 15:43

Attempt to access the method failed.

Post by GUYS » Thu 23 Mar 2006 15:09

Hi,

I got the components in runtime working using Visual Web Developer 2005 Express Edition, but when trying to connect to my database using "MySqlConnection conn = new MySqlConnection(connectionString);" I get the error "Attempt to access the method failed". I know this has got to do with the trust level settings of my ISP. But that is exact one of the reasons why I would like the use the CoreLab components.

Can you help?

Guy

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 24 Mar 2006 11:00

CoreLab.MySql assembly doesn't contain unsafe code, it contains AllowPartiallyTrustedCallers attribute, it is fully CLS compliant. These actions allow using MySQLDirect .NET on web servers.

We think the problem might be in your server configuration. Contact your ISP to configure the server to allow using of CoreLab.MySql assembly.

GUYS
Posts: 2
Joined: Wed 22 Mar 2006 15:43

AllowPartiallyTrustedCallers & trust level

Post by GUYS » Fri 24 Mar 2006 12:45

Thanks for the answer.

I'll ask them to do so. Can you tell me what actions they should do to allow the use of the CoreLab.MySql assembly ?

Thanks,

Guy

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 30 Mar 2006 13:15

The problem can be resolved as follows:
You have to add

Code: Select all

 
into section and

Code: Select all

                            
subsection into

Code: Select all

			
section in file
Or you can set "trust level" attribute to "Full" in \web.config file.
Besides, you should download new version (3.50) from our site and use it, because this problem was not fixed in 3.20 version.

Post Reply