"Permission denied" error message when you read properties of the Location object that is inside an HTML Application (816885)
The information in this article applies to:
- Microsoft Internet Explorer 6.0 Service Pack 1
SYMPTOMSWhen you read certain properties of the Location object that is inside an HTML Application (HTA), you may receive a
"Permission denied" error message. The relevant properties of the Location object
include:
- Location.href
- Location.hostname
- Location.reload
Note You may notice this error only if you use an automatic
configuration script in the Local Area Network (LAN) settings of Microsoft Internet
Explorer. If debugging tools are installed on your computer, you may
receive an error message that is similar to the following: A
Runtime Error has occurred. Do you wish to Debug? Line 12 Error: Permission
denied If debugging tools are not installed on your computer, you may
receive an error message that is similar to the following: An
error has occurred in the script on this page. Line: 13 Char: 2 Error:
Permission denied Code: 0 URL:
http://WebServer/FileName.hta Do you want to continue
running scripts on this page? Note You may notice this problem only if your automatic configuration
script has the DIRECT value. RESOLUTIONTo resolve this problem, use any of the following
methods: Note The following methods are based on the sample that is mentioned in the
"More Information" section of this article. Therefore, the code and the file
names in these methods may differ from your code and from your file names.
- Hard code a proxy server in the Proxy server settings of
Internet Explorer instead of using an automatic configuration script, and then press
F5 to refresh the HTA in the browser.
- Use a host name instead of a Fully Qualified Domain Name
(FQDN) to access the path to the HTA.
- Use an IP address to access the
HTA.
- Add the Web site that you are accessing to the Trusted zone
or to the Restricted zone.
- Do not use the Location object in your code.
- Click to clear the Include all sites that bypass
the proxy server check box in the Security settings of Internet
Explorer.
STATUS This
behavior is by design.REFERENCESFor more information, visit the following Microsoft
Developer Network (MSDN) Web site:
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
314209
You cannot access the Location object of the parent from a child window
Modification Type: | Major | Last Reviewed: | 4/6/2004 |
---|
Keywords: | kbprb kbWebBrowser kbScript kbMSHTML kbbug KB816885 kbAudDeveloper |
---|
|