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
RMS ITRMS IT 

Web service integration with Salesforce: (500) Internal Server Error

Hi,

Currently my organization have a web service that would periodically update information into salesforce. Until recently we are unable to gain access to Salesforce. Our logs only shows the error message below. 

 --> The remote server returned an error: (500) Internal Server Error. 
System.Net.WebException: The remote server returned an error: (500) Internal Server Error. 
   at OrderWF.SF.SyncWindowsService.SyncAdvCustToSF.CallSFService(String accessToken) 
   at OrderWF.SF.SyncWindowsService.SyncAdvCustToSF.ProcessSync() 

And below are the information from the web config files that we would update the password and security token every 60days.
I have double check the password and security token information to be correct. 

    <add key="SFAdvCustNoOAuthService.ServiceURL" value="https://login.salesforce.com/services/oauth2/token"/>
    <add key="SFAdvCustNoOAuthService.GrantType" value="password"/>
    <add key="SFAdvCustNoOAuthService.ClientId" value="3MVG9WtWSKUDG.x6rq8gfzguj0ran8aXqFOEpmn7PiIHr2fCNw35hAarblEiDbT4gO8Wn7dBWTNGqN2uyKQSP"/>
    <add key="SFAdvCustNoOAuthService.ClientSecret" value="4729694440366245264"/>
    <add key="SFAdvCustNoOAuthService.Username" value="(Hide)"/>
    <add key="SFAdvCustNoOAuthService.Password" value="(Hide)"/>
    <add key="SFAdvCustNoOAuthService.SecurityToken" value="(Hide)"/>
    <add key="SFAdvCustNoService.ServiceURL" value="https://emea.salesforce.com/services/apexrest/AdvCustNoService"/>
    <add key="Timer.Interval" value="300000"/><!--1 min = 60000 miliseconds-->

Would appreciate any suggestion or help to resolve the issue.

Thanks

Regards
Best Answer chosen by RMS IT
RMS ITRMS IT
Hi,

Probably not the case. The web service will try to reach salesforce every 1 minutes to do an upsert.
so i don't believe is sessions expire on inactivit.

Thanks

All Answers

NagaNaga (Salesforce Developers) 
Hi RMS,

Can you check if its got anything to do with the sessions expiring?
API sessions expire on inactivity, if there's a long enough gap between your api requests the session will get expired, and you'll need to call login again.

Best Regards
Naga kiran
RMS ITRMS IT
Hi,

Probably not the case. The web service will try to reach salesforce every 1 minutes to do an upsert.
so i don't believe is sessions expire on inactivit.

Thanks
This was selected as the best answer