Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If I login on two page in same brower, not detected by the program #9

Open
gplesz opened this issue Sep 27, 2013 · 4 comments
Open

Comments

@gplesz
Copy link

gplesz commented Sep 27, 2013

Maybe could monitor the connection ID, then:

string connectionId = Context.ConnectionId;
var username = string.Format("{0}|(connection:{1})", Context.User.Identity.Name, connectionId);

I do not know whether to be interesting, but you can watch here: https://github.com/gplesz/CollidR

(I also requested to send any pull.)

@MisterJames
Copy link
Owner

I actually hadn't considered solving that problem, i.e. "You are already editing this record in another browser", but that's a completely valid scenario. Thanks @gplesz :)

@gplesz
Copy link
Author

gplesz commented Sep 27, 2013

I am happy if I can help, because I like to use the CollidR:)

But: if you leave the first page, the second page is gone from the userlist.

@MisterJames
Copy link
Owner

So, I like what you're doing here, but i want the user names to be kept in tact so that on the client they display in a human-friendly format. I'm going to extend the class that encapsulates the list of connections and add an ID to the user so that, server-side, I can track this type of connection...every browser tab has it's own connection ID so this should be easy enough.

@gplesz
Copy link
Author

gplesz commented Sep 28, 2013

Exactly. (I've done it is neither beautiful nor practical, just an idea.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants