ASP.NET: browser popups and session cookies

SUMMARY: When viewing an ASP.NET website using Windows Explorer, pop-ups do not β€œborrow” session cookies from the parent window.

DETAILS:

I am working on an ASP.NET website (.NET 2.0). I am using FormsAuthentication. You must use cookies to process the session.

I have a button on the page. When the user clicks on it, a popup window opens. A popup window displays an ASPX page that uses session variables previously set in the parent browser window. I tested the website using IE (6, 7, 8) and Firefox 2.0. In all these browsers, the popup window has access to the same session as the parent browser window, and everything works fine.

I now have an error caused by the client, stating that a popup is displaying an error. If you look at the log file, I see that this is a NullReferenceException at the moment the pop-up page is trying to access session variables. Talking with a client, he said that he had opened the main website in Windows Explorer.

I was able to recreate the problem on a test computer and saw that the popup was using a new session.

The machine must have Win XP installed with IE6! With IE7, the site works fine.

+1
source share
2 answers

My suspicion is that when you open Windows Explorer (not in the sense that I fully understand what you mean by this), session cookies that are sent back are not stored anywhere and thus are not accessible to the pop-up window for inclusion of his request. I do not understand how you can get around this. Is it not possible to tell the client that this means of accessing the application is not supported?

0
source

I saw the same problem with IE 8, problems do not occur in Firefox, Google Chrome or IE 6. In my case, I see that the session is actually working. Authentication completes the redirect of the user to the login page again to login ...

0
source

Source: https://habr.com/ru/post/1439802/


All Articles