I have a webservice that logs to Salesforce, and keeps track in memory of the session expiration by getting the value of loginResult.userInfo.sessionSecondsValid from the SFDC LoginResult part of the WSDL Enterprise API, adding the seconds to a static DateTime object for future evaluations at runtime.
In the development and testing stages (from lots of different workstations and webservers) I had no problems, but after installing it to production I realized that it was login in on each WebMethod call.
I thought the static variable was losing its value, and posted a question in SO about it.
By debugging the condition that determined if there was a need for retrying the login in the production box, i realized that loginResult.userInfo.sessionSecondsValid returned as zero, and checking in my local workstation and other development servers the value correctly returned as 7200 (2 hours for session expiration in our org).
What could cause the difference in the expiration times? some security setting perhaps?
Thanks in advance.