Page 1 of 1

Attempt to access the method failed.

Posted: Thu 23 Mar 2006 15:09
by GUYS
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

Posted: Fri 24 Mar 2006 11:00
by Alexey
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.

AllowPartiallyTrustedCallers & trust level

Posted: Fri 24 Mar 2006 12:45
by GUYS
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

Posted: Thu 30 Mar 2006 13:15
by Alexey
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.