Microsoft KB Archive/899291

From BetaArchive Wiki
Knowledge Base


Article ID: 899291

Article Last Modified on 8/13/2007



APPLIES TO

  • Microsoft Internet Explorer 6.0
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition




SYMPTOMS

In Microsoft Windows XP Service Pack 2 (SP2), when you use Microsoft Internet Explorer to view an HTML Web page that references HTML Component (HTC) files and XML files, the script that references these files does not run. This problem occurs when you view a Web page that references HTC and XML files that are in the Local Machine zone.

Note The Local Machine zone is an implicit zone. This zone is used for content that exists on the local computer. Except for content that Internet Explorer caches on the local computer, Internet Explorer grants a high level of trust to content that is located on the user's computer.

CAUSE

This problem occurs because the Local Machine Zone Lockdown feature in Internet Explorer prevents active content and scripts from running in the Local Machine zone. Additionally, the Zone Elevation Blocks feature prevents content that has a lower level of trust from accessing content that has a higher level of trust. Therefore, a Web page that is in the Internet zone cannot access HTC or XML files that are in the Local Machine zone.

WORKAROUND

To work around the Local Machine Zone Lockdown feature and the Zone Elevation Blocks feature, use one or more of the following methods.

Method 1

Use the Mark of the Web (MOTW) comment in all the HTC and XML files. When you are developing Web content, the MOTW lets you test active HTML documents in the security zone in which you want the pages to run. If you add the MOTW to the Web pages, you can also fully test the compatibility of the page with users' security settings.

Note In Internet Explorer 6, the MOTW works for HTML, HTC, and XML files. In earlier versions of Internet Explorer, the MOTW does not work for HTC or XML files.

Method 2

Use an HTML application (HTA) instead of HTML files. HTAs run like any executable (.exe) file that was written in C++ or in Microsoft Visual Basic. Internet Explorer gives a high level of trust to HTAs. Only the menus, the icons, the toolbars, and the title information that the Web developer creates in the HTA appear in Internet Explorer. Therefore, HTAs can use the features of Internet Explorer without being blocked by the Local Machine Zone Lockdown feature or by the Zone Elevation Blocks feature.

For more information about HTAs, visit the following Microsoft Developer Network (MSDN) Web site:

Method 3

Create a separate application that hosts the HTML content in the Web Object Control (WebOC). The WebOC is also known as the WebBrowser ActiveX control. When you use the WebOC in an application, users can do the following:

  • Visit Web sites on the Internet.
  • Browse folders in the local file system and in the network file system.
  • View documents.
  • Download data.

When HTML content runs in the WebOC, this content is not bound by the same rules as when this content runs in Internet Explorer. When HTML content runs in another process, this content can have the full rights that have been defined by the developer or by the zone policy of that process.

For more information about how to develop Web-based solutions for Internet Explorer, visit the following MSDN Web sites:

Method 4

Create a local share and then put all the content files in the share. When you browse a share, the share is treated like the Local intranet zone.

REFERENCES

For more information, visit the following Microsoft TechNet Web site:

Keywords: kbprb kbtshoot kbinfo KB899291