Web Connection
Datasessions
Gravatar is a globally recognized avatar based on your email address. Datasessions
  Rod
  All
  Aug 24, 2022 @ 02:28pm

Hi Rick & all, I have a WestWind/VFP site that is straight HTML and SQL Server. No forms or framework other than Rick's basic classes. Is it possible to assign a separate/unique/private VFP datasession to each user that logs in and hits the process class? Thank you, Rod

Gravatar is a globally recognized avatar based on your email address. re: Datasessions
  Rick Strahl
  Rod
  Aug 24, 2022 @ 04:00pm

No not really possible because you'll likely have multiple FoxPro instances running and they can't share data sessions.

It's also not a good idea - Sessions are essentially stateful which is the anti-thesis of what Web requests should be. Each request should be self contained.

You might be able to save some state in custom or folder specific tables and reuse that data, but generally I think this is a bad idea. It gets complicated cleaning this stuff up after you are done. You're better off ensuring that your logic can continue running where it left off on subsequent requests.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Datasessions
  Rod
  Rick Strahl
  Aug 25, 2022 @ 04:51am

...and as usual all it takes is asking the question to realize the answer. So to paraphrase, it's not necessary since the WW server console takes requests asynchronously and if we have multiple server instances each one would effectively be private anyway I assume. So you are right, its about making sure the process logic cleans up on each request. We had a few "hanging aliases" we could not account for and trying to nail down. Thank you.

© 1996-2024