Microsoft Knowledge Base Email Alertz

(196383) - When windows are opened from script in an HTML page using window.open or ShowModalDialog, Internet Explorer responds by prompting users to enter their username and password every time a new window is created. This happens even though the user already...

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 196383 - Last Review: June 21, 2004 - Revision: 2.0

FIX: Windows Opened by Script Lose Authentication or Session

This article was previously published under Q196383

On This Page

SYMPTOMS

When windows are opened from script in an HTML page using window.open or ShowModalDialog, Internet Explorer responds by prompting users to enter their username and password every time a new window is created. This happens even though the user already entered a correct username and password and successfully authenticated with the Web server.

New windows may also lose Web server session information, creating a new session or reusing an older, incorrect session from a separate Internet Explorer instance.

Also, if the new window contains a Java applet that accesses static information from a class, it may not be able to share that information with an applet in another window.

These symptoms do not appear if the Windows Desktop Update is installed and the browser is not set to "Browse In New Process."

CAUSE

When asked to create new windows through script, Internet Explorer might create the window in the wrong Internet Explorer process. Because authentication credentials and the temporary cookies used for session identification are cached per process, new windows need to re-authenticate and start a new session if they don't open in the same process as their opening window.

This behavior can appear random; the determined process for new windows is dependent on several variables, including timing and browser configuration.

RESOLUTION

To resolve this problem, upgrade to the latest version of Internet Explorer or Microsoft Windows NT 4.0 Service Pack 6a (SP6a). You can download the latest version of Internet Explorer from the following Microsoft Web site:
http://www.microsoft.com/windows/ie/ (http://www.microsoft.com/windows/ie/)
Disabling the "Browse In New Process" browser setting in the Advanced tab of the Internet Options will alleviate most of the symptoms described in this article.

However, Web servers should avoid relying on this as a solution. Web sites that expect users to change browser settings will have a negative user experience, particularly when other sites require a different value for the same settings. Users in corporate environments may not even have control over this setting. Furthermore, disabling "browse in new process" can affect the stability of the system shell and some users may need to use "Browse In New Process" when they are working with pages that contain a lot of Active Content.

Note that all session-managed pages should be set to expire immediately. Some session inconsistencies can result when pages are pulled from the cache rather than from the Web server.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Internet Explorer 4.01 Service Pack 2 and Internet Explorer 5.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create the following Active Server Pages (ASP) page on an Internet Information Server machine, version 3.0 or later, in a scripts directory:
    
          <%@ LANGUAGE="VBSCRIPT" %>
          <HTML><HEAD><TITLE>Test for Session ID</TITLE></HEAD>
          <BODY>
          ASP SESSION ID:
          <%= Session.SessionID %>
          <P>
          <FORM><INPUT TYPE=BUTTON ID=PushME onclick="return openwindow();"
                 VALUE="WindowOpen"></FORM>
          <SCRIPT>
    
          function openwindow()
          {
             window.open("test.asp");
          }
          </SCRIPT>
          </BODY></HTML>
    						
  2. Verify that the "Browse In New Process" setting is selected in Internet Explorer on the client machine. This setting is in the Browser Settings section in the Advanced tab of the Internet Options dialog box.
  3. On the client machine, launch exactly one Internet Explorer instance. Navigate to the ASP page created in step 1. Click the "WindowOpen" button to execute window.open and create a new window.

    Note that the ASP Session ID matches in both child and parent window.
  4. Create a new Internet Explorer instance by invoking Internet Explorer from the Start menu or Desktop icon. Again, navigate to the ASP page created in step 1. Click the "WindowOpen" button.

    Note that the ASP Session ID does not match in both child and parent window of the new process. In some cases, this may be the session ID of the first pair of Internet Explorer windows.

REFERENCES

Similar symptoms can occur when working with Office documents or other Active Document servers in a Web environment.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
185978  (http://kbalertz.com/Feedback.aspx?kbNumber=185978/ ) FIX: Double GET requests and cookies are lost with Word 2000 or Excel 2000

APPLIES TO
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Internet Explorer 4.01 Service Pack 2
  • Microsoft Internet Explorer 4.01 Service Pack 1
Keywords: 
kbbug kbfix kbie500fix kbqfe KB196383
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

luwt - luwt1972 NOSPAM-AT-NOSPAM yahoo.com.cn Report As Irrelevant  
Written: 9/27/2004 6:41 AM
this issue occur on IE6 sp1 also

Dacloo Report As Irrelevant  
Written: 9/28/2004 1:19 PM
jep, IE6 doesn't fix this highly annoying problem.

Ottawa - o_ttawa NOSPAM-AT-NOSPAM yahoo.ca Report As Irrelevant  
Written: 10/27/2004 2:11 PM
This problem is in IE6 too! I am using Forms Authentication in my VB.NET Web application. When there is Window.Open to open a new window, after I've closed this new window, and do a postback on my origional page, it displays the Login.aspx instead.

Ottawa - o_ttawa NOSPAM-AT-NOSPAM yahoo.ca Report As Irrelevant  
Written: 10/27/2004 2:17 PM
In this article the suggested resolution is: "Browse In New Process" browser setting in the Advanced tab of the Internet Options ". However, in IE6, this option is NO LONGER exists, check out this article at: http://support.microsoft.com/?kbid=240928 it says "...you cannot configure this setting because it is automatically enabled or disabled based on the amount of random access memory (RAM) that is installed in the computer. If the computer has less than 32 megabytes (MBs) of RAM installed, this setting is disabled and all instances of Internet Explorer share the same process. If there is 32 MBs of RAM or more installed on the computer, the setting is enabled, which causes new instances of Internet Explorer to create new processes. " Does it mean that this lost-of-authentication problem in IE6 is depend on the RAM at the time your run your application?

Anonymous User Reported as Irrelevant  
Written: 2/8/2005 11:57 PM
The problem still exist in IE6 and ASP.NET after window.open Forms Authentication stop working.

Anonymous User Report As Irrelevant  
Written: 1/21/2008 12:56 AM
I am having IE6 with SP2, but still see the problem....A click to a submit button in a model dialog actually popped up another window asking for login information.