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
KSuitorKSuitor 

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

We have a deal registration page written several years ago that recently has begun to issue the following error result:

 

Server Error in '/' Application.


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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.Services.Protocols.SoapException: INVALID_LOGIN: Invalid username, password, security token; or user locked out.

Source Error: 

Line 313:        [return: System.Xml.Serialization.XmlElementAttribute("result")]
Line 314:        public LoginResult login(string username, string password) {
Line 315: object[] results = this.Invoke("login", new object[] {
Line 316:                        username,
Line 317:                        password});


Source File: c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\2e8459de\3693a8ff\App_WebReferences.rp7ndgxb.0.cs    Line: 315 

Stack Trace: 

[SoapException: INVALID_LOGIN: Invalid username, password, security token; or user locked out.]
   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +413081
   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300
   sforce.SforceService.login(String username, String password) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\2e8459de\3693a8ff\App_WebReferences.rp7ndgxb.0.cs:315
   Exinda.SalesForce.SFConnection.Connect(String username, String password) in c:\inetpub\wwwroot\exindaweb2\App_Code\SForce\General\SFConnection.cs:21
   DealRegistration_Default.ConnectToSalesForce() in c:\inetpub\wwwroot\exindaweb2\DealRegistration\Default.aspx.cs:62
   DealRegistration_Default.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\exindaweb2\DealRegistration\Default.aspx.cs:40
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428



Version Information: Microsoft .NET Framework Version:2.0.50727.3623; ASP.NET Version:2.0.50727.5053

 

The firm that coded thsi for us is long gone.  Any ideas what we should be looking for?

_Prasu__Prasu_

I will suggest you to login to the Salesforce with that username and password, navigate to the user details page and at the bottom you should be able to see the login history which will give details why login attempt is failed.

ms0713ms0713

I think you are trying to login twice or more with the same sForceService.login();

 

so if its like that than create different  sForceService object for simultaneous logins.

 

but i m not sure.

 

Ramakrishnan AyyanarRamakrishnan Ayyanar
using (SforceService service = new SforceService())
{
LoginResult loginResult = service.login(username, String.Concat(password, securityToken));
this.SessionID = loginResult.sessionId;
this.ServerUrl = loginResult.serverUrl;
}
try in this model in your code