Skip to content

System.MethodAccessException when calling Key.Activate #52

@samirem

Description

@samirem

I'm trying to call Key.Activate, but I get the following exception:

System.MethodAccessException: 'Attempt by security transparent method 'SKM.V3.Methods.Helpers.GetPlatform()' to access security critical method 'System.Runtime.InteropServices.OSPlatform.get_Linux()' failed.

Assembly 'Cryptolens.Licensing, Version=4.0.25.1, Culture=neutral, PublicKeyToken=30182975912ff1ef' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model.  Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.'

Running version 4.0.25.

I've tried mixing around with attributes such as [assembly: SecurityRules(SecurityRuleSet.Level2)] without any success so far.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions