Enter password without get credentials

@amaresan @bobby @Palaniyappan @loginerror

I have tried using
upass = new system.Net.NetworkCredential(“”, "”).SecurePassword

it gives error
Value of type ‘String’ cannot be converted to ‘System.Security.SecureString’.
upass is securestring type variable

check your upass’s type,if it is securestring type variable,it should not give error.

1 Like

Hi @Sakshi_Jain

Use below code to convert string to secure password

upass=new system.Net.NetworkCredential(string.empty,upass).SecurePassword

Use below code…to convert secure to string

upass=new system.Net.NetworkCredential(string.empty,upass).Password

Thanks,
Amaresan

1 Like

@Sakshi_Jain

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

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