Reputation: 1520
Our site have functional something like a cart store. The user can add tickets to cart, but the user can do it without authorization. When user added ticket to cart, in the DB creates order with service information, but UserId
is empty. When user click Pay
, then it must to authorize. The cart exist only 15 minutes. If user close site, and enter again the during 5 minutes then site must show cart for this user.
The question: How to determine and track non autrorized users?
Upvotes: 0
Views: 55
Reputation: 8540
Authorize them as guest users, giving temporary name (GUID). With default asp.net settings that will produce cookie, which will be used by asp.net for user identification, you can use it to bind guest to cart contents and on payment you will reauthenticate them.
FormsAuthentication.SetAuthCookie(Guid.NewGuid(), true)
Upvotes: 1