Hello,
I am getting this error:
Cannot perform CAS Asserts in Security Transparent methods
Recently my hosting company has changed the trust level from FULL to MEDIUM.
I have already tried set direct=false in connection string, but no sucess.
What should we do?
The stack trace:
annot perform CAS Asserts in Security Transparent methods
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Cannot perform CAS Asserts in Security Transparent methods
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Cannot perform CAS Asserts in Security Transparent methods]
System.Security.CodeAccessSecurityEngine.CheckNReturnSO(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 create) +0
System.Security.CodeAccessSecurityEngine.Assert(CodeAccessPermission cap, StackCrawlMark& stackMark) +61
System.Security.CodeAccessPermission.Assert() +28
Devart.Common.CRLicenseProvider.a(Stream A_0, String A_1, String A_2, String& A_3) +132
Devart.Common.CRLicenseProvider.a(LicenseContext A_0, Type A_1, String& A_2, String& A_3, String& A_4) +2931
Devart.Common.CRLicenseProvider.a(LicenseContext A_0, Type A_1, String& A_2, Boolean& A_3, String& A_4, String& A_5) +33
Devart.Common.CRLicenseProvider.a(LicenseContext A_0, Type A_1, Boolean A_2) +184
Devart.Common.CRLicenseProvider.a(LicenseContext A_0, Type A_1, Object A_2, Boolean A_3) +1458
Devart.Data.MySql.MySqlConnection.Open() +95
Pim.teste.Page_Load(Object sender, EventArgs e) +44
Error: "Cannot perform CAS Asserts in Security Transparent methods "
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Error: "Cannot perform CAS Asserts in Security Transparent methods "
According our documentation:jonataspc wrote:I have already tried set direct=false in connection string, but no sucess.
What should we do?
If you cannot change the trust level and its settings, you may install dotConnect for MySQL with the Minimal install type on the server. This will register dotConnect runtime assemblies in the GAC. In this case your web application should work with medium trust level.docs wrote:In client mode - just medium trust permissions. However, if there are no dotConnect for MySQL assemblies in GAC, the UnmanagedCode flag should be added to SecurityPermission section.
For more information, please refer to http://www.devart.com/dotconnect/mysql/ ... yment.html
Re: Error: "Cannot perform CAS Asserts in Security Transparent methods "
Thanks for the reply.
I will change my hosting provider.
I will change my hosting provider.