1

I develop a site where certain pages a user can only access when he is logged in.

For certain requests I would be better when I open new window. Mostly I use the session to store data including the user data.

To open a new window I use:

ScriptManager.RegisterStartupScript(this, typeof(string), "OpenWindow", 
              "window.open( '~/smsftd1', null,'height=400,width=600, status=yes, 
               toolbar=no, menubar=no,location=no' );", true);

It opens the window and it looks how I want it and how it should behave. The only downside is that all data I have saved with the session variables are gone.

If I redirect in the same pages or even open a new tab it works fine and all session variables are available.

When I search for the issue it was pointed out it is an IE issue (older versions). I changed the settings in the IE browser settings but it did not help.

The main issue is that I loose the authorisation the user made. At the moment I removed to opening of a new window and just redirect.

If someone has done this I wish to know so I can organise a better flow. The only option I could think of is storing data in a cookie instead of the session. Any feedback please?

Rene
  • 29
  • 1
  • 9

1 Answers1

1

There is no direct answer, but you can check with fiddler or trash tool in firefox. Please increase your session timeout.

Also check in global.aspx, that there is no event call when new window open.

The best thing is fiddler to check where you all history show about what are the cookie/session variable, link to redirect etc.

Please this link before doing anything.

After a few window.open calls my ASP.NET session times out

http://bytes.com/topic/asp-net/answers/287080-session-variable-window-open

Keeping ASP.NET Session Open / Alive

Add in web.config and try(reference from above link)

"<httpHandlers>
<add verb="GET,HEAD" path="SessionHeartbeat.ashx" validate="false" type="SessionHeartbeatHttpHandler"/></httpHandlers>"
Community
  • 1
  • 1
Ajay2707
  • 5,690
  • 6
  • 40
  • 58
  • 1
    I am still working my way around this and try to fix it:) getting closer to the solution but have still some issues. I hope I can mark it next week as answer. Thank you @Ajay2707 to suggest these solutions – Rene May 16 '14 at 05:06
  • Tnx dear that my comment helps you. The best thing is firefox Session manager https://addons.mozilla.org/en-US/firefox/addon/session-manager/ – Ajay2707 May 16 '14 at 05:52