It seems that due to the AllowPartiallyTrustedCallers attribute, when my assembly calls Aspose, it (Aspose) cannot call its own dependency on System.Text.CodePages dll due to System.Text.Encoding.CodePages being SecurityCritical. Anyone seen this before?
System.TypeInitializationException : The type initializer for ‘Aspose.Cells.Workbook’ threw an exception.
----> System.MethodAccessException : Attempt by security transparent method ‘Aspose.Cells.Workbook…cctor()’ to access security critical method ‘System.Text.CodePagesEncodingProvider.get_Instance()’ failed.
Assembly ‘Aspose.Cells, Version=18.10.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ 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.