This is for when Salesforce returns the [INVALID_LOGIN: Invalid username, password, security token; or user locked out] exception when starting up.
Please check the Salesforce connection string details in the ConnectionStrings.config file.
The default connection string will be similar to:
<add name="S4SConnString" connectionString="S4S:user firstname.lastname@example.org;password=mypassword;token=XAAABBBCCCDDDZUZeGw0mF823;environment=Sandbox"/>
- User id and password work when directly logging into Salesforce at https://login.salesforce.com/
- Security token for the user is either defined against the token parameter or appended to the password. You may need to reset your security token.
- Environment is correct. If undefined the code will default to the production environment. In the example above the session will be established to the Salesforce sandbox.
- Set the Sitecore log to capture DEBUG level messages and inspect the log when the error occurs.
You do not have to use the security token if you have added your Sitecore IP address as a trusted network in Salesforce. Go to Salesforce Setup >> Security Setup >> Network Access and add your IP addresses as Trusted IPs.