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
GrantSchenckGrantSchenck 

Office Toolkit Login Timeout?

Hello,

 

We are developing a telephony server app that prompts callers to enter an account number and in response looks up the corresponding SF account and retrieve a "priority" field to determine how to route the call.

 

Our service logs into SF at startup but then, after running overnight we seem to get a COM exception.  In response I found that if I delete our Session, create a new one and login again I can stay connected.

 

So, couple of questions:

 

1)  We get a COM exception.  Is there some value of the exception that tells me that the exception was caused because my login expired and timed out vs. the other fatal reasons my query might fail?

 

2)  Is this how I should handle login, that is, anytime I make a request and get the an exception I should try to login again?

 

3) Is deleting the session how I effectivly "log out"?

 

The documentation on the office toolkit doesn't talk about session timeout, at least from what I've been able to see.

 

Thanks!

 

Grant Schenck

werewolfwerewolf

First: any chance you could write this using .net instead?  It would be a lot easier, the OT is a source of many headaches as you know.

 

To answer your questions:

 

1.  You should be able to pull an SError from the SForceSession3 (or SForceSession4) that has a code in it, and the code for a timed out session is INVALID_SESSION_ID.

2.  Yes.

3.  You don't.  When you delete the session key, you are effectively logged out.