I'm designing an asp.net system like this to allow multiple pages, tabs, sessions on one or more machines, to create and edit guid based key requests based on a smallish tree of sql records, using a wizard interface so this is basically a long running web app saving data that is only written to the database at the end when the user submits. We don't want the same data being editing by more than one user or tab.
I plan to use the guid key to create/claim a lock object stored in appstate. The lock object also has userid/timestamp/PageToken. The page token is a guid but can be null if the page token based session object is pre-created for another page in the same session [so can pass more data to the new page] or the token can be valued the session object is created for the current page. When the session object is created based on the key, it can be used to store normal session type data, which is now unique for this key, rather than shared across the entire session.
So the first page creates the key object in app state w/o a pagetoken and then links to the new page that ckaims the key object from appstate using its querystring with the key, and by matching userid/timestamp/PageToken with null or a valued token. If it matches and was a null token, the token is created and stored in the key object and in the viewstate.
If another page comes in with the same query string matching the guid key, it can try to claim the appstate key object but will fail unless has the same userid/timestamp/PageToken in the key object having got the page token form the viewstate. And if everything matched, updates the timestamp. If the timestamp is too old, 15 minutes, the the key object can be stolen. and If the old page comes back looking for it the page token will no longer match and claiming will fail due to either the timestamp too old or the page token not matching.
The token can be null or valued when the key object is created. If it starts out null when created, then anyone can claim with a new token but must match the timestamp pretty close.
Then the related key object which can be a larger size, is stored in the session using the page token as the key into session data such as a serializeable dictionary in case this needs a sql backing store.
So we are able lock data across the entire web app all users, we can expire and reclaim the locks after say 15 minutes of non use, and have key based data for tabs, pages, new sessions and different browsers.