> Yes all along with the user id for the current "owner" of the site (so that
> you can check if recent activity was caused by the same or by another user
[quoted text clipped - 27 lines]
>
> - Show quoted text -
The requirement that only one user be logged on at a time is because
this site is used to process payroll taxes and the processing is done
one step at a time and each step needs to be done in sequence. Like a
state machine.
How do you get the user id? Is this a "Document" or a "Page"
parameter?
Thanks again this has been sooo helpfull.
Steve
IfThenElse - 18 Oct 2007 00:53 GMT
You can always have an Admin Account that can unlock a user if she-he
forgets to logout properly.
Also you need to make sure that the processing is done by that user
Can one user start processing then logsout then another user logs in and
Finishes the processing?
The Admin account can unlock or reset flags.
By the way, this is Pain In The A.
On Oct 17, 10:29 am, "Patrice" <http://www.chez.com/scribe/> wrote:
> Yes all along with the user id for the current "owner" of the site (so
> that
[quoted text clipped - 31 lines]
>
> - Show quoted text -
The requirement that only one user be logged on at a time is because
this site is used to process payroll taxes and the processing is done
one step at a time and each step needs to be done in sequence. Like a
state machine.
How do you get the user id? Is this a "Document" or a "Page"
parameter?
Thanks again this has been sooo helpfull.
Steve
mark4asp - 18 Oct 2007 07:22 GMT
>> Yes all along with the user id for the current "owner" of the site (so that
>> you can check if recent activity was caused by the same or by another user
[quoted text clipped - 39 lines]
>
>Steve
You get the userID from the user cookie (where you would've put it) when
the user authenticates [using the _OnAuthenticate() in Global]. If the
cookie ticket fails authentification you get the UserID from your
database when the user logs in. The UserID is then added to the security
context - eg. something like this:
protected void FormsAuthentication_OnAuthenticate(Object sender,
FormsAuthenticationEventArgs e)
{
blah blah ...
e.Context.User = new System.Security.Principal.GenericPrincipal(new
FormsIdentity(Ticket2), aRoles);
Context.Items.Add("UserID", strID);
blah blah ...
}
So, you can use forms authentification with an encrypted cookie. Whether
or not you use a cookie, the UserID can be kept in the security context
and is then always available to you as: Context.Items["UserID"] (in this
case). There are more sophisticated variants like this with custom
Principals.
Detect the end of a session using this method:
<http://www.eggheadcafe.com/articles/20051228.asp>
Rory Becker - 18 Oct 2007 17:01 GMT
>> You may want to elaborate a bit as this is an unsual requirements.
>> What does requires this ?
»
> The requirement that only one user be logged on at a time is because
> this site is used to process payroll taxes and the processing is done
> one step at a time and each step needs to be done in sequence. Like a
> state machine.
So why can't you store the current state (against the user ID in some backend
database) at each stage of the process so that multiple people could use
the system at once.
Seems strange to lock people out when you could serve more than one at once...
Is that not better?
--
Rory
Larry Bud - 19 Oct 2007 13:05 GMT
> > Yes all along with the user id for the current "owner" of the site (so that
> > you can check if recent activity was caused by the same or by another user
[quoted text clipped - 32 lines]
> one step at a time and each step needs to be done in sequence. Like a
> state machine.
There a better way to do this. In a table, set flags as to what step
has been accomplished, or a "nextstep" value. Don't let a user into
any page except the one that equates to the "nextstep".
Once that step is being processed, don't allow another user process
it. Basically whomever clicks "Submit" first wins.