I am rewriting a web app that uses the SalesForce API for .NET 2.0. When I run the app it works using the 2.0 API, so the username and password I'm using must be good (the
SoapClient.login method has two parameters).
For the new app, I am using the API for .NET 3.0. In the SalesForce documentation (and all other examples I've seen) the
SoapClient.login method in the 3.0 API has three parameters:
LoginScopeHeader, username, password. Working in Visual Studio, my code will not compile with the three-parameter login method. Intellisense is indicating I need a fourth parameter:
LoginScopeHeader, CallOptions, username, password. So I tried
loginClient.login(null, null, username, password). I keep getting the following error:
INVALID_LOGIN: Invalid username, password, security token; or user locked out.
As I mentioned, I believe the username and password to be good, because the app works using the 2.0 API with the same credentials. For the same reason, I must not be locked out. So, I am down to the security token. I've seen example where you have to append the security token to the password to log in, but I do not have to do that using the 2.0 API.
So, I have two questions:
- Why is Visual Studio telling me
SoapClient.logintakes four parameters when every .NET 3.0 example I've seen shows three?
- Does the .NET 3.0 API require the security token, even if the 2.0 API does not (in my case)?