Cookie loss (Authentication failure) Authentication (user Authentication information) will also be lost

Source: Internet
Author: User

I wonder if you have encountered such embarrassment:

When your page Authentication adopts the Cookie-based method, such as form and windows integrated Authentication, the following operations may cause the Authentication to fail and Authentication (user Authentication information) to be lost. You need to log on again
After the system is logged on normally:

The first page (pagea.htm): publish the second page (pageb.htm)

The second page (pageb.htm): the pop-up window (pagec.htm) is displayed on the login page.

This should be because different pages exist in different processes, resulting in non-synchronization of identity information and authentication failure. However, there is a probability that this will happen. With the help of MS consultants, finally found the method:
Summary: When showmodaldialog(upload, upload windowless objects to pageb.htm. In PageB, use this parameter to open (). This solves the problem.
The details are as follows:
-----------PageA.htm --------------
...
Var obj = new Object ();
Obj. mytest0000wa = window; // Save the window to the object parameter
Window. showModalDialog ("PageB.htm", obj ,"");
...
----------------------------------

-----------PageB.htm --------------
...
Var obj = window. dialogArguments; // obtain the parameters of the previous page.
Obj. mytest0000wa. open ("PageC.htm"); // use the parameters passed on the previous page to open the next page.
...
----------------------------------
After testing, there was no loss of identity, and it was a success!
And open () cannot pass object parameters!
Pipeline transformation is as follows:
-----------PageB.htm --------------
...
Var obj = window. dialogArguments; // obtain the parameters of the previous page.
Var obj. mytest0000wa. mytest0000wb = new Object ();
Obj. myTestWindowA. mytest1_wb = window; // hangs the PageB window under the window branch of PageA.
Obj. mytest0000wa. open ("PageC.htm"); // use the parameters passed on the previous page to open the next page.
...
----------------------------------
In this way, you can use window. opener. mytest1_wb in PageC to communicate with objects on the PageB page, for example, Zookeeper opener.mytestwindowb.doc ument. getElementById ("TextBox1"). value = "OK"

Note:
1. This may be only one case. Opening and showModalDialog may also lead to loss of identity information, but you can solve the problem by passing the correct window to the next page.

(For lost information, see http://www.ourac.net/read.php? Tid = 45123 & fpage = 2)
2. It is also possible that Session occurs, see http://support.microsoft.com/default.aspx? Scid = kb; EN-US; 196383

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.