Keeping State of Objects Without Session

Sep 25, 2008 at 3:13 PM
Hi,

I'm having trouble understanding this part of the source code. I know that all objects provided by the ESP Search API are non-serializable... so how do you keep the state of this objects without using Session State? What was your workaround?

Thanks.
Developer
Oct 13, 2008 at 12:40 PM
We are using the request scope for that.

All WebParts can contribute search parameters to an instance of IESPSearchSettings which is kept in the request scope. This can be done by overriding the ConfigureSearch() method which is called in the
webpart OnInit lifecycle method.
This object is later used (In the CreateChildControls lifecycle) to perform the search. Once the search is performed the results are injected to the webpart in the method SetSearchResult.
You should be able to get some more information on that in the ESPSearchWebParts\src\UI\ESPSearchWebPart.cs which implements the whole lifecycle and creates the used UCF and Search Settings object.

 

Jan 29, 2010 at 8:03 PM
Edited Feb 1, 2010 at 5:28 PM

Hi

Can anyone help me out in understanding this bit more clear.

I would be really thankful if someone could help me with this.

Thanks

Carol