views:

143

answers:

4

Hello,

I have been struggling with a following problem. I have an ASP.NET application that has a certain search engine. It is possible to perform the searching by using prepared links. So I have a MS Word document that contains the links. When I click such a link a new IE8 window is opened, an ASP.NET session is spawned, the searching is performed and some results are displayed in the browser and stored in the session. Now when I send a new request by clicking something in the newly opened page a new session is spawned once again, thus the previously stored results are inaccessible. I would appreciate any suggestions how to handle this.

Best regards, B.

A: 

Depends on how you're handling sessions. Most likely, you're using SessionID cookies and the client is rejecting cookies. (Or at least not persisting the cookies between the two requests for whatever reason).

Massif
A: 

you cannot have same sessions inside multiple browser instances. implement a cookie based approach where you maintain your search result sets based on cookie. also doing anything in sessions is a bad practice in asp.net

Raj
+1  A: 

Maybe you use cookieless sessions?

You can also consider to use Cache instead of Session so different users can share the same search results for better performance.

UserControl
No I do not use cookieless sessions.
+1  A: 

Borat,

When you click a link in word document, each link opens in a NEW instance ** of IE window which creates a **new session. Because of this you are unable to access the previously searched results.

Inorder to solve this problem, try to create the persistent cookies on client side and store the searched queries in this persistent cookie. These persistent cookies are created locally on the client computer. By doing this all browser windows will be able to access the same persistent cookie.

Hope this will solve the issue....

Thanks

Rasik Jain