I have a session.timeout =600 but they seem to be timing out much sooner. Does the IIS has a hard limit on this?

Also, does anybody know a function to detect when a session is about to be ended so I can alert the user?
thx