CPM - Web application with Generate TOTP MFA Code getting error 9313

CPM - Web application with Generate TOTP MFA Code getting error 9313

119
Created On 11/10/26 10:54 AM - Last Modified 11/10/26 15:50 PM


Symptom


When configuring web application webform.ini following Idira Document for Generate MFA code in Example 3 to handle MFA code but getting Return code: 9313.

Debug logs:
03/06/2024 11:15:18.556 | ERROR -> ExecuteCustomLogic :: Run -> Details : System.Exception: Failed to generate MFA code. Exception: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at Cyberark.Extensions.GenerateTOTPCode.GenerateTOTPCode.ExecuteCustomLogic(IInputParameters inputParameters)
   at CyberArk.WebAutomationCommon.Commands.ExecuteCustomLogic.ExecuteCustomLogic.Run(CommandsParameters commandsParameters)

 


Environment


14.0 Privileged Access Manager (PAM, self-hosted);Privilege Cloud Central Policy Manager (CPM)
  • Central Policy Manager (CPM)
  • Web Applications for CPM


Cause


Based on following Microsoft article:
http://go.microsoft.com/fwlink/?LinkId=155569

The enabled attribute for this element is effective only when code access security (CAS) is disabled. By default, CAS policy is disabled in the .NET Framework 4 and later versions. If you set enabled to true, remote applications are granted full trust.


Resolution


Create or edit CANetPluginInvoker.exe.config in \Password Manager\bin folder.

Adding below lines:-

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000jrbCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail