I have a website, parts of which are subscription based. As part of the subscription license, a user is allowed to use the license on different devices (this is an important point in the user can for example update data on their computer at the office, and then have access to the data on their tablet/mobile while on site).
I want to stop any possible abuse by a company purchasing a single license and giving the login details to all their employees. I would like a robust C# class written to provide the necessary control to achieve this. I will integrate the class into my site.
This is my thinking on how to achieve the requirements, although I am fully open to any other suggestions.
An MS sql server table contains the licensing details:
fields: LicenseID int identity, UserID int, NumberOfLicences, int
Access to the database should be via LINQ to SQL ([url removed, login to view], [url removed, login to view], name DataClassesDataContext auto-generated). class.
Single user access and security are already set up. I intend only to maintain the license table for larger clients who want multiple licenses. If a userID does not exist in the table, then it should be assumed he has only one license.
My thought is to keep track of everything in session, with a timed expiration, say 5 minutes (although I suppose an SQL table is an option). A cookie gets created on the users device to identify the user and device (a guid for example). The class checks if the cookie exists, if not creates it.
If the user and device are in the session, he is allowed to continue (with the session timeout refreshed). If not the number of number of devices the user is currently working on is retrieved. If the number of machines exceeds the number of licenses the user is flagged (set a LicenseExceeded property to false). If not in the session and number of licenses is not exceed the user/machine are added to the session The bidder needs to work out and verify the full logic.
Typical class properties should be LicenseesAvailable, LicensesInUse, LicenseExceeded, etc. In the final implementation, I will get the user id server side from
[url removed, login to view]().UserID;
For development/testing, will need to simulate.
I would also like to log to the database daily (24 hour) summaries. For each user which access the site in a day log:
* MaximumNumberOfConcurrentDevices - for that day
* NumberOfLicencesAvailable - on the day of the logging
The logging will enable me to plot usage per user over time (compared to their available licenses) and discuss with the client if the need to increase (or reduce) their current number of licenses.
Initially, I will just log any overuse and deal directly with the user to resolve it. Later I may implement restrictions, where if example the LicenseExceeded property is true, the user is redirected to some page to deal block access.
It is important that the above not interfere with the user experience on the site. Bidders should address this. The class should be fully commented/documented (so that I can understand, implement in my site and modify if necessary later) and follow Microsoft best practices.
The above describes my intent and my initial thoughts on how to achieve this. If bidders can propose a better solution, I am open to looking at this.
8 los freelancers están ofertando un promedio de $341 para este trabajo.
I am experienced in SQL and programming with c# for over 12 years and thus can handle the work easily. contact me if my skills match your requirement.