This thread was archived. Please ask a new question if you need help.
Using window.open equivalent in firefox causes .NET session variables to go away. Why? How can I fix?
I have an application which runs in Adobe/Apache Flex with a .NET middle tier.
To run reports I need them to run in a separate window so I use;
navigateToURL(url, "_blank"); This works swimmingly in all browsers (IE, Chrome & Edge) except Firefox (FF). The app has been around for quite a while, and I can't imagine that it never worked in FF, but it doesn't with the last couple of releases.
The symptom is that the .NET "Current.Session.SessionID" changes to a new ID for both the original browser window as well as the new browser window. This causes it to lose all session variables, of course.
The problem only seems to manifest itself if I use "POST" to send variables to the popup window. If I use "GET" everything works fine. An added "bonus" is the "Post" parameters being sent to the new window disappear. So my report doesn't run, and the original window "loses its mind since the session ID changes."
As a test I dusted the cobwebs off and created two ASPX pages which did
<form method="post" name="TestForm" action="TestWopen2.aspx" target="_blank">
The problem was not exhibited in that environment on any browser including FF.
This leads me to believe that Adobe Flex (Flash) is mucking things up a bit.
All Replies (3)
I have an application which runs in Adobe/Apache Flex with a .NET middle tier. To run reports I need them to run in a separate window so I use:
The symptom is that the .NET "Current.Session.SessionID" changes to a new ID for both the original browser window as well as the new browser window.
Is the Flash plugin part of the equation? The Flash plugin runs in a separate process from web content, which might affect relevant cookies. Of course, that wouldn't explain why you have a change in the original context as well as the new context.
What was the last version of Firefox that didn't exhibit this issue? For testing, you may be able to use installs from PortableApps that run out of a single folder and don't use/affect settings on the system:
- Current: https://portableapps.com/apps/internet/firefox_portable/
- Older: https://sourceforge.net/projects/portableapps/files/Mozilla%20Firefox%2C%20Portable%20Ed./
You might also look at:
Unfortunately I am not generally a Firefox user, so I am not sure when it stopped working. I have not been tracking how many people use the application. What I do know is that within the last month or so we have been getting reports of odd things occurring, and the users are generally running Firefox. When we ask them to switch to Chrome/IE/Edge they no longer have the problems.
I think the most interesting anomaly in this scenario is if I change the request to a get, from post, passing the parameters on the url, while leaving everything else the same, the new window gets the data, and the original window running Flash keeps functioning normally.
The application having the issue is not available for general use. I have another application which uses the same framework, which I can allow access to for testing. I will run Firefox tests on that app to see if it has the same issue. If so, I will post the url and instructions on how to generate the problem.
I have done two further tests.
- Ran a similar type of "post" from Flash in my test environment. This was a totally different application which calls the same report writer from flash running a different report. This worked fine.
- Ran the exact same report passing the exact same variable/value pairs to a popup using a .NET (aspx/html) form, in the live environment where Firefox fails, and it works fine.
Modified by Aceinc