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
Amritesh SinghAmritesh Singh 

INVALID_SESSION_ID', exceptionMessage:'Invalid Session ID found in SessionHeader: Illegal Session

Hi Folks,

 

I am getting this error Error IINVALID_SESSION_ID' exceptionMessage='Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key'  while calling Apex webservice class  from .net.This webservice  class ,i have deployed from sanbox to production.

 

Strange fact is , its working fine when i call same webservice classfrom Sanbox.

 

i ahve cheked my session setting and its fine no locks are there.i am using partner Wsdl of each instance in their respective call.

 

 

Thanks in Advance.

Best Answer chosen by Admin (Salesforce Developers) 
Amritesh SinghAmritesh Singh

HI vbs,

 

i actually found what i was doing wrong.i was using webservice class  wsdl which is pointing to test  in my .net program.

Now i changed  wsdl to production webservice class wsdl and it is working fine.

 

thanks 4 reply though..:)

All Answers

vbsvbs
How are you authenticating from your .net application? Can you let us know the endpoints used for the authentications calls?
Amritesh SinghAmritesh Singh

thanks vbs for quick reply,

 

i am using production partner wsdl and my account username,passwd+Token for authntication in my .net code.

vbsvbs
What are you using as an endpoint in the WSDL? I think you must be calling a setEndPoint or setURL before authentication so that it calls the correct endpoints before authenticating, what does this refer to test.salesforce.com/services/Soap/c/24.0/ or login.salesforce.com/services/Soap/c/24.0/ somthing like that?
vbsvbs
How are you setting the Authorization header as session id? Can you confirm the session settings on the production org?
Amritesh SinghAmritesh Singh

HI vbs,

 

i actually found what i was doing wrong.i was using webservice class  wsdl which is pointing to test  in my .net program.

Now i changed  wsdl to production webservice class wsdl and it is working fine.

 

thanks 4 reply though..:)

This was selected as the best answer