Попытка прозрачного метода безопасности для доступа к критическому методу безопасности не удалась

Попытка прозрачного для безопасности метода PayPal.UserAgentHeader.get_OperatingSystemFriendlyName () получить доступ к критичному для безопасности методу System.Management.ManagementObjectSearcher..ctor (System.String) не удалась.

Assembly 'PayPalCoreSDK, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself.  In order to access security critical code, this assembly must be fully trusted.

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.MethodAccessException: Attempt by security transparent method 'PayPal.UserAgentHeader.get_OperatingSystemFriendlyName()' to access security critical method 'System.Management.ManagementObjectSearcher..ctor(System.String)' failed.

Assembly 'PayPalCoreSDK, Version=1.4.1.0, Culture=neutral, PublicKeyToken=null' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself.  In order to access security critical code, this assembly must be fully trusted.

Этот стекопоток ответ упоминает добавление[SecuritySafeCritical] атрибута к классу, но в этом случае класс в игре находится в DLL, загруженной через NuGet.

Есть ли какие-либо глобальные настройки, которые я могу использовать, чтобы обойти это исключение?

Ответы на вопрос(5)

Ваш ответ на вопрос