Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simultaneously account login with max of three

Status
Not open for further replies.

Liezz

Programmer
Nov 4, 2011
6
NL
For a project I’m looking for a solution for the following problem:
A user can now login to our ASP.Net musicApp with his/her browser.
Now we want to make it possible to login to the musicstore on devices (smartphone etc.)
The problem is in the fact that we want the possibility that a user can login on his account simultaneously with different devices. Think of using the app with his pc and mobile at the same time. And we don’t want to use Cache if possible.
Now have I learned about Design Patterns, only do not know how to use it in this problem.
Who can help?
 
So what exactly is your question? Do you want to allow a user to be able to login to your application a maximum of 3 times?

If so, you will have to have a table in your DB that keeps track of the number of times the user has logged in. However, this is by no means foolproof in a web app as opposed to a windows app. For example, if the user is logged in, and their session times out, the DB will not be decremented, even if you put code in the global.asax.
 
A user must be able to login three times simultaneously.

We're trying to do something with the thread in a Object Pool design pattern. But Object Pool is meant for Objects. :p

I'm thinking maybe its possible to use a array with logindata, number (1,2 or 3) and a timestamp. En dan use a Observer to trigger the update of the array.

But I have no clue if this may work or not...
 
by default a user can log into a web app from multiple locations (browser, os, physical device). what doesn't make sense is why you need to limit the number of simultaneous logons?
And we don't want to use Cache if possible.
this situation has nothing to do with Cache.
Now have I learned about Design Patterns, only do not know how to use it in this problem.
:) knowing the patterns is the first step. But patterns alone don't solve problems. they provide a way for developers to communicate how they solved a problem, but the pattern itself doesn't solve the problem.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
A user may login in with max 3 devices (say PC, Tablet and phone).

The person who wants this system, wants it this way. Couldn't talk him out of it.

So the question remains, how can it be done...
 
So the question remains, how can it be done...
The problem is can't be done reliably in a web app. Web apps are stateless. If you were talking about a windows app, there would be no discussion, it would be a piece of cake.
 
don't try to talk the client out of it, at least not directly. control the dialog and ask questions that would lead the client to conclusion that limiting the number of simultaneous logons isn't a feature that adds value to the product.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
We have choosen a web app, because we must be able to change the interface of the client without using updates on the serverside.


 
could you clarify your last statement. what do you mean by
change the interface of the client without using updates on the serverside

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
On the serverside the owner must be ably to change the clientside interface without updates on the clientside.

For example the text or a photo or color of something for the client interface will be added or removed at serverside and the client will see the new interface after logging in. And a this without updates.

That's why we choose a web app.

 
you mean the use can personalize the UI? that doesn't require the UI to be a webpage. the same could be done on a desktop app. you are defining the styles at runtime, rather than design time. that doesn't require compilation. I would imagine WPF would be easier to customize than winforms, but it's not impossible.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
No not personalize, the server administrator must be able to change the interface for all clients without a update.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top