- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
06-08-2012 04:45 AM
I followed example given on this link : http://wiki.developerforce.com/page/Force.com_for_
it worked perfectly for my SF developer account.
But when I tried the same with different SF credentials without changing web service reference (as other account also had apex web service methods to pull leads detail) it gave me below error (I passed correct username, password with access token for both users).
INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key:
My question is : how can my .NET app authenticate multiple SF users using same WSDL file?
If not then what is the other way around?
Thanks in advance!!
Solved! Go to Solution.
06-08-2012 08:45 AM
06-14-2012 05:03 AM
Finally I got it!!
LoginResult lr = sforcebinding.login(_userId, _passwordWithToken);
int index1 = lr.serverUrl.IndexOf(@"/services/");
int index2 = getLeadInfo.Url.IndexOf(@"/services/");
if (index1 == 0 || index2 == 0)
Response.Write("Invalid URL in bindings");
getLeadInfo.Url = lr.serverUrl.Substring(0, index1) + getLeadInfo.Url.Substring(index2);