Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have attended an interview, their the interviewer asked me a question like,
How to maintain only one login per user at a time in asp dot net.

I replied that to keep a flag in user table for their login and reset while they log out the application.

But the interview do not accepts this answer.

Do you people think that any other efficient way is there for this requirement.

Thanks in advance fro the answer.
Posted

The interviewer did not accept that answer? Sounds like you don't want that job. You are correct, mostly.

It's hard to know when a user "logs" out of the application unless they specifically click a Logout link because they could close their browser and you wouldn't know it. Their computer could crash and you wouldn't know it. They could lose power, etc, etc. So, the only thing I would clarify to your answer is to just check each time they login if they are already logged in under a different session. You'd want to store a timestamp as well.

However, it's still tricky. I don't know if IE still has this issue but when IE introduced tabs sometimes opening a link from my app in a different tab would kick off a new session and sometimes it wouldn't. So, it's still the same login per user but could potentially kick off another session.

With my bank, it used to be that if you did not click logout but just closed your browser and then came back to try and login before your session expired they displayed a message that you had to wait another 15 minutes at least since they only allowed 1 login at a time and this looked like more than one.

Bottom line, this is the web, unless you have a very good reason to do so, don't limit users to one session at a time. It's bad form.
 
Share this answer
 
This is my personal opinion and it is certainly not universal.

Do not be discourage by this interview. Simply forget it!

I maintain that 80% of the interviews are just show and your interviewer does not know half so much about how his questions!

Take an attempt at a next interview and bluff a little bit. Flood the interviewer with actual slogans/buzzwords. But do not overdo it all too much .... just in case you then get the job.

Show self-confidence and a bluff a little bit!

All the best for your next interview!
Regards, Bruno

[EDIT]
Don't be impressed too much from your counterpart (interviewer). Also he/she tries only to sell him at the best and to appear as a very professional. Not everything that glitters is gold ;)
[/EDIT]
 
Share this answer
 
v2
Comments
CHill60 3-Oct-14 21:44pm    
Bluff a little bit??? Really? "Flood the interviewer with buzzwords"??? Really?
[no name] 4-Oct-14 15:22pm    
And next time please be so fair to mention that you down voted!
Hidden down votes are cowardice
[no name] 4-Oct-14 4:54am    
Yes really! Sell ​​as good as possible.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900