Yes, I have managed to check if a user already has an other session on the .Net/ISS stack with SQL database.
Of course, the user needs to be logged in, before you can check this.
In short:
- Sessions are stored in a separate database (osSession in my case)
- Create a Database connection to this database (preferably with a read only user)
- In IntegrationStudio create a mapping to two of the three tables: ASPStateTempSessions and ASPStateTempSessionExtVars
- In your application set the dependencies to be able to use this tables
- Create a query joining these two tables based on the session id
- Filter on:
- ASPStateTempSessionExtVars.UserId being the Session.UserId
- ASPStateTempSessionExtVars.Cookie being the Session Id you can get with HTTPRequestHandler.GEtSessionId (bit strange, but the session id in the tables have some extra characters)
- ASPStateTempSessions.ExpirationDateTime > CurrDateTime()
This did the trick for me.