function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ms0713ms0713 

INVALID_LOGIN: Invalid username, password, security token; or user locked out.

Here is my source code..

 

SforceService binding = null;
LoginFault loginFault = new LoginFault();
LoginResult loginResult = null;

binding = new SforceService();
binding.LoginScopeHeaderValue = new LoginScopeHeader();
//binding.Url = ConfigurationManager.AppSettings["sfLoginUrl"];//Config.SforceLoginUrl;
binding.Timeout = 60 * 1000 * 10;
try
{
loginResult = binding.login(ConfigurationManager.AppSettings["ProductionEmailId"], ConfigurationManager.AppSettings["ProductionPassword"]);
binding.Url = loginResult.serverUrl;
binding.SessionHeaderValue = new SessionHeader();
binding.SessionHeaderValue.sessionId = loginResult.sessionId;
log.Debug("LoginResult Urls : "+ binding.Url);
}
catch (System.Web.Services.Protocols.SoapException exception)
{
binding = null;
log.Error( "sforceService Object not set : " + exception.Message, exception);
}

 

 

 

i m getting the error like  "INVALID_LOGIN: Invalid username, password, security token; or user locked out."

 

when i login in my developer accouont it works fine.

but in my .net (c#) application it is giving me this error.

can anybody knows what could be the problem?

 

should i set that Url in sforceService Object?

 

what difference it makes when i set it?

 

I deployed it in live and having the same problem.

 

thanks in advance!

SuperfellSuperfell

You need to include your API security token with your password.

ms0713ms0713

OK.

but How?

where can i find this api security token?

and i want know about that url property.

Can u give me a demo code, please?

thanks Simon .

 

SuperfellSuperfell

look for identity confirmation in the online help & training.

ms0713ms0713

Ok i got my security token and its letting me login ..

but i have to provide that url property prior to calling login() method of sforceService object and i want to about that.


thanks for your help !!!

 

and  i want to know the reason of providing security token.

 

 

SuperfellSuperfell

What exactly is your question about the URL? the correct URL to use is in the WSDL document.

 

As descrbed in the help, the security token is there to help prevent phishing and other identity related issues.

Hardik BodaraHardik Bodara

ms0713 can you please provide me a refenace link or step to get security toekn ?

Thanks !!