BUG: The registry key settings in HKLM\Software\Microsoft\Ole can stop client-side script debugging in Internet Explorer (832730)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Academic Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition

SYMPTOMS

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

When you try to debug Microsoft Internet Explorer client-side script by using Microsoft Visual Studio .NET, debugging may stop.

Microsoft Internet Explorer client-side script debugging may not work for the following conditions:
  • If the HKLM\Software\Microsoft\Ole\LegacyImpersonationLevel registry key exists and the value is 0.
  • If the HKLM\Software\Microsoft\Ole\DefaultAccessPermission registry key exists and the value does not include the user who runs Internet Explorer and the LocalSystem account.

WORKAROUND

To work around this bug, modify the registry key values as follows:

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
  • If the LegacyImpersonationLevel registry value exists, change the value from 0 to 2, and then restart the computer.
  • If the DefaultAccessPermission registry value exists, either remove it or change it to include the user who runs Internet Explorer and the LocalSystem account.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.

MORE INFORMATION

Steps to reproduce the behavior

Create an ASP.NET Web Application project

  1. Start Visual Studio .NET.
  2. Create a Microsoft ASP.NET Web Application that named ScriptDebugTest by using Microsoft Visual C# Projects or Microsoft Visual Basic Projects.
  3. In Solution Explorer, right-click the ScriptDebugTest project, point to Add, and then click Add HTML Page. By default, the HTMLPage1.htm file is created.
  4. In the HTML view of the HTMLPage1 page, add the following code:
    <html>
    <head>
    <title>HTML1</title>	
    <script id=clientEventHandlersJS language=javascript>	
    function Button1_onclick() 
    {
    alert("Hello");
    }
    </script>
    </head>
    <body>
    <INPUT id="Button1" type="button" value="Button" name="Button1" onclick="return Button1_onclick()">
    </body>
    </html>
    
  5. Insert a breakpoint in the client-side script.
  6. On the File menu, click Save All.
  7. In Solution Explorer, right-click HTMLPage1, and then click Set As Start Page.

Debug the script

  1. On the Debug menu, click Start Without Debugging. The HTMLPage1.htm page appears in a new Internet Explorer browser window.
  2. On the Debug menu, click Processes.
  3. In the Processes dialog box, click the IEXPLORER.EXE process for the HTMLPage1.htm page, and then click Attach.
  4. In the Attach to Process dialog box, click to select the Script check box, click to clear all other check boxes, and then click OK.
  5. Click Close to close the Processes dialog box.
  6. In the HTMLPage1.htm page that appears in step1 of the "Debug the script" section of this article, click Button. Notice that the debugger stops at the breakpoint in the client-side script.

Add a registry key value

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
  1. Click Start, and then click Run.
  2. Type regedit in the Open box, and then click OK.
  3. In Registry Editor, locate the HKEY_LOCAL_MACHINE\Software\Microsoft\Ole\ registry entry.
  4. Right-click Ole, point to New, click DWORD Value, and then type LegacyImpersonationLevel. By default, the value of LegacyImpersonationLevel is 0.
  5. Close Registry Editor.
  6. Restart the computer.

Debug the project after the registry value is added

Repeat the steps that are in the "Create an ASP.NET Web Application project" section and the "Debug the project" section of this article. Notice that the Internet Explorer client-side script debugging does not respond.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

Modification Type:MinorLast Reviewed:3/7/2006
Keywords:kbvs2005swept kbvs2005doesnotapply kbvs2002sp1sweep kbpending kbRegistry kbDebug kbprb kbbug KB832730 kbAudDeveloper