c# - Technique for user license implementation in asp.net mvc -


currently i'm searching technique create named user license system asp.net mvc. example customer has bought 10 user licenses, should possible, log in 10 times parallel.

the problem i'm struggeling with, fact there no permanent connection in web technologies. (between client , server, besides using web sockets or similar things).

or there known , alternative?

thank much!

a possible solution (which may or may not right 1 you), store amount of sessions user has , allowed have in 2 columns in database.

let's have functions login(username, password) , logout(username), or similar. then, need 2 new columns in database, 1 storing maximum amount of sessions user can have, e.g. maxsessions , other 1 containing current count of sessions user has, e.g. cursessions.

now can check every call of login(username, password) if user has reached maximum of allowed sessions, , deny access service. if hasn't, add 1 cursessions, run other login code. if logout(username) gets called, remove 1 cursessions, , run logout code.

if understood question right way, looking for.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -