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
ray cheng 6ray cheng 6 

Couldn't login via SOAP client to get Session ID

I'm new to this platform and created a developer account and following the tutorial here (at the last part now):
    https://developer.salesforce.com/page/Force.com_for_ASP.NET_Developers#Creating_Your_First_Visualforce_Page

When I call the "login" method, I got an error message saying:
    INVALID_LOGIN: Invalid username or password, locked out or Customer Service Portal is not enabled

I have already enabled the Customer Portal at Setup | Customize | Customer Portal and also added myself ias the portal Administrator. My organization, postal id and login username and password are also correct. The endpoint uri is:
    https://login.salesforce.com/services/Soap/c/29.0

Here's the c# code:

var ss = new SForce.SoapClient();
var lr = ss.login(new LoginScopeHeader() { organizationId = "{15_char_id}", portalId = "{15_char_id}", }, "{userid}", "{pass}");
ShashForceShashForce
ray cheng 6ray cheng 6
Hi Shashank,

The link you provided uses "ConnectorConfig" class which I don't have in my generated classes from Enterprise WSDL. I found a C# version of the login code in http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_login.htm but the "login" method takes 2 arguments. However, in my generated class, the method takes 3 arguments.

LoginResult login(LoginScopeHeader LoginScopeHeader, string username, string password)