Error: Input Dialog: TypeConverter cannot convert from System.String

Hi guys,

I have a question about this error. I have already assign the value: securePassword = (new System.Net.NetworkCredential("", “input_password”)).SecurePassword, see below screen shot. Why it still return me an error, which indicates that the String does not convert to a Secure String? Thanks in advance.

Hi @Yu_Winni

Don’t put input_password inside double quotes (remove the double quotes) as it is a variable and not text thanks

Thank you for your quick reply. I have removed quotation mark, but the error shows the same. Not sure why it happens?

change Input_password variable type from secure string to string, it will work thanks

1 Like

@Yu_Winni

  1. Secure String to String
new System.Net.NetworkCredential(string.Empty, secureStr).Password
  1. String to Secure String(image )
new System.Net.NetworkCredential(String.Empty, varStr).SecurePassword

Make sure, you are assigning the value to secure string variable image

@Yu_Winni
You can do this change and it will work. I got confused with your requirement

You can also use my custom activity which is very easy to use.

It can convert string to secure string and also can secure string to string…

Many thanks, prasath_S. It works now. :slight_smile:

Thank you Pravin_Patil1, too.

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