You need to sign in to do that
Don't have an account?

SOAP API C# login error INVALID_LOGIN: Invalid username, password, security token; or user locked out.error
While attempting to login C#, Soap API, enterprise wsdl. I am getting INVALID_LOGIN: Invalid username, password, security token; or user locked out.error. I will be grateful for any assistance in resolving this error.
My Code is
SoapClient loginClient = new SoapClient("Soap");
string sfdcUserName = "abc@gmail.com";
string sfdcPassword = "Password";
string sfdcToken = "LegAguRb2CzEifnoiPNcVT5UE";
//Login
LoginResult result = loginClient.login(null, sfdcUserName, string.Concat(sfdcPassword,sfdcToken));
//Read the information
mSessionId = result.sessionId;
mServerURL = result.serverUrl;
My Code is
SoapClient loginClient = new SoapClient("Soap");
string sfdcUserName = "abc@gmail.com";
string sfdcPassword = "Password";
string sfdcToken = "LegAguRb2CzEifnoiPNcVT5UE";
//Login
LoginResult result = loginClient.login(null, sfdcUserName, string.Concat(sfdcPassword,sfdcToken));
//Read the information
mSessionId = result.sessionId;
mServerURL = result.serverUrl;
Is the user API enabled? You could check this by using the same details with another API based tool.
There is also sample code for calling the login method in https://developer.salesforce.com/page/Consuming_Force.com_SOAP_and_REST_Web_Services_from_.NET_Applications