Title: RE: [ND] Lossing UserSessionObject

You can't rely on the value of a class variable to remain the same between webevents. During the processing of a page for display, all the events that fire for that are considered one webevent. So if your in the this_onbeforedisplayevent, and you get the value for something from a sessionobject, and place it in a page class variable. Any other event that fires can reliably access that class variable. So some field_onbeforedisplayevent can get it no problem. Once the page is completely rendered and sent on its way, the web event is over.

Now if you press a button on the page, it starts another webevent. Those class variables could have values from your previous webevent, or someone elses webevent. You should consider them unreliable, and repopulate them either from sessionobject, hidden fields on the page, a database, or some other mechanism.

Why is it this way? To avoid the overhead of instantiating the projects for each request. The project is instatiated once per worker per CP service. All requests take turns with the object. Speeds things up. That's why the first person into a project after clearing cache or cycling a server, takes so long, but the next person gets in right away.

This is a common problem, best illuminated by attending a class.

John Hoskins
TDS Computing Services
Application Development & Support
mailto:[EMAIL PROTECTED]
(608) 664-8263
(608) 664-8288 (fax)


-----Original Message-----
From: Damian Gomes [mailto:[EMAIL PROTECTED]]
Sent: 7/13/2000 7.01 PM
To: [EMAIL PROTECTED]
Subject: [ND] Lossing UserSessionObject



I am able go from one project to the next, and the UserSessionObject persists.
But, in the third page of the next project, I access a value from the userSessionObject with no problems (in the onBeforeDisplayEvent).

In the onWebEvent the same object (string) which I grabbed earlier in the page, is gone..

Solutions or NetD stress releivers are welcome.

_________________________________________________________________________
To unsubscribe from this mailing list please send an email to:
[EMAIL PROTECTED]
Please remember to use the same email address you subscribed with.

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

_________________________________________________________________________ To unsubscribe from this mailing list please send an email to: [EMAIL PROTECTED] Please remember to use the same email address you subscribed with. For help in using, subscribing, and unsubscribing to the discussion forums, please go to: http://www.netdynamics.com/support/visitdevfor.html For dire need help, email: [EMAIL PROTECTED]

Reply via email to