You need to sign in to do that
Don't have an account?
aravind swaminathan
Tried upgrading to TSL1.2 from TSL1.0 for Salesforce API and getting Invalid username, password, security token
Hello,
We tried to upgrade to TSL1.2 using
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
conn = new SalesforceConnection(userNAME, passWORD, secTOKEN);
in our .NET Console Application to connect to Salesforce and we are getting the error below when initializing the connection.
INVALID_LOGIN: Invalid username, password, security token; or user locked out.
Can you please let me know what am i doing wrong here and please suggest a fix for this?
Thanks in Advance.
We tried to upgrade to TSL1.2 using
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
conn = new SalesforceConnection(userNAME, passWORD, secTOKEN);
in our .NET Console Application to connect to Salesforce and we are getting the error below when initializing the connection.
INVALID_LOGIN: Invalid username, password, security token; or user locked out.
Can you please let me know what am i doing wrong here and please suggest a fix for this?
Thanks in Advance.
i would run couple of verification for these error messages:
1. Are you connecting to the correct environment? Production (login.salesforce.com) v/s Sandboxes (test.salesforce.com)?
2. Have you verified with the login history if the connection is indeed hitting the right environment ?
Should give you some hints as where its going wrong...
Does it work now? Can you please let me know how to set up:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
Many thanks.
Thanks its working now.I was pointing to diiferent environment.
Just use ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; before your connection and it should work fine.