We have currently configured Session timeout as 2 hours on the API User Profile. Our Org. is connected to a .net application using these API User credentials. Say connection is established successfully with SF so the session id .net app use is going to be valid for 2 hours though there is no activity on it. 1. Is my understanding correct? 2. .net App(basically a tool) if closed after connecting it with SF and opened it within 2 hours time frame then can the same session id be used? Can someone please clarify?
For both of your questions the answer is Yes. But the time frame is maintained under the
Session Settings in Setup.
As per docs:
The session timeout for an access token can be configured in Salesforce from Setup by entering Session Settings in the Quick Find box, then selecting Session Settings.
In Session Setting you can maintain all the configuration related to Session maintenance. But if any user change it at profile level then it will override this default value.