How to use SecureString with GetAppCredentials?

You can check that the password string is correct by converting the secure string to string and then using a write line. Then you can check the length is correct.

To convert:
password = new System.Net.NetworkCredential(string.Empty, securePassword).Password