NetStandardPasswordSDK throws error using with .Net Framework 4.6.2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

NetStandardPasswordSDK throws error using with .Net Framework 4.6.2

L0 Member

Hi Team,

​

i am working on CyberArk integration with existing project (developed in .Net Framework 4.6.2) to get password from CP agent.

​

Since CyberArk Provides two SDK's to support .Net applications, as per below link

​

https://docs.cyberark.com/credential-providers/13.0/en/Content/LandingPages/CP-WN-RN-13.0.htm

​

  1. NetPasswordSDK – it supports .Net Framework 4.8
  2. NetStandardPasswordSDK – it Supports.Net Framework 4.6.2 and later version and .NET 6

​

Since our project is developed in .Net Framework 4.6.2 so i have used NetStandardPasswordSDK , but i am receiving following error “CyberArk.AAM.NetStandardPasswordSDK.Exceptions.PSDKException: Object reference not set to an instance of an object. from the call in PasswordSDK.GetPassword.

​

Same SDK i have tried with Console application (.Net Framework 4.6.2) it is working fine and able to get password. Below is the code i have used

​

    PSDKPasswordRequest passRequest = new PSDKPasswordRequest()

        {

          AppID = appid,

          Safe = safe,

          Folder = root,

          Object = object,

          Reason = reason,

          ConnectionPort = port,

          ConnectionTimeout = 20

        };

​

        passRequest.RequiredProperties.Add("PolicyId");

        passRequest.RequiredProperties.Add("UserName");

        passRequest.RequiredProperties.Add("Address");

​

        password = PasswordSDK.GetPassword(passRequest); - Getting error on this line

        pwd = new string(password.Content);

​

Do i need to add any configuration/setting to work with .Net Framework 4.6.2?

i have added NetStandard 2.0 assembly reference to WebApi project. still it's not working.

​

Since many clients using this application, we can't upgrade our .Net Framework.

​

Please let me know if any settings need to be add to work with Web Api in .Net Framework 4.6.2.

​

Thanks in Advance.

​

​

​

​

​

1 REPLY 1

L5 Sessionator

Hi @Nishanth P​ 

 

As the community has not answered this question for some time, could you kindly share if you could resolve this issue and how?

 

If the issue is still relevant, I would advise raising a ticket with our Support team for further assistance.

 

Thanks,

Gil

  • 329 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!