Prompting cant convert secure string to string!

created a library of acme login page having arguments of username(string) and password (secure string) and trying to use it in another project but prompting error like cant convert secure string to string but have got an example like same has got succesfully run without any error.

Hi @Sai_Kumar_111

You have declared the PWD as string, and if you are using Get credentials, then the Password is of Type SecureString not the String

If you want to convert that SecureString to a String then you can use Assign activity and declare another String type variable as below

strPassword = new System.Net.NetworkCredential(string.Empty, PWD).Password

Then you can use strPassword in to TypeInto

But you can use TypeInto Secure Password also without converting

Hope this may help you


1 Like



Use assign activity
Before you are passing the value in the ACME activity

str= new,yourstringvariable).password


1 Like


Can you try to change Type of PWD to SecureString as the following?


1 Like


as the argument which you have created while developing the ACME library having password as Securestring

so you need to change either the datatype of it while using or you can use above mentioned expression to change secure string to string


1 Like

Thank you for the info Srinivas,this helped!!! :slightly_smiling_face:

Thank you Nikhil,this helped!!! :slightly_smiling_face:

1 Like

Thank you Yoichi,this helped!!! :slightly_smiling_face:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.