Avatar of SamCaldwell
SamCaldwellFlag for United States of America

asked on 

Permission problem encountered with xmlHTTPrequests in Windows Vista using javascript.

(1) The current problem occurs in an HTA designed to publish information to and request information from a corporate web server.
(2) The current xmlHTTPrequest is written in javascript (below).
(3) When run under Windows XP Professional Service Pack 2, no problem exists.
(4) When tested on Windows Vista Ultimate x64 Service Pack 1, a permission error appears.
(5) The line where the permission error occurs is--

var objHTTP= new ActiveXObject("Msxml2.XMLHTTP");


CODE EXCERPT:

            function GetUpdateSD()
            {
                  var objHTTP = new ActiveXObject("Msxml2.XMLHTTP");
                  var strURL = TOC_SD_UPDATEURL + "&" + getClientID() + "&" + generateSID() + "&";
                  objHTTP.open('GET',strURL,xmlHTTPreqAsynchronous);
                  objHTTP.onreadystatechange=xmlHTTPrequestHandler_updateSD;
                  objHTTP.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
                  objHTTP.send(null);
            }
AJAXScripting LanguagesJavaScript

Avatar of undefined
Last Comment
SamCaldwell
Avatar of Morcalavin
Morcalavin
Flag of United States of America image

Is the server you are trying to request information from on the same domain as your .hta application?

XMLHttprequest will only work on same domain.
Avatar of SamCaldwell
SamCaldwell
Flag of United States of America image

ASKER

The hta runs on a local domain/workgroup depending upon the user.  Some of them use company computers, some of them use home computers.

The hta accesses information on a corporate webserver (different domain).

From some of what I have read, .hta relaxes the same-domain requirement.  Remember, I am not having a problem on XP Pro (which I would have typically if the same-domain requirement applied to hta applications).
ASKER CERTIFIED SOLUTION
Avatar of Morcalavin
Morcalavin
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of SamCaldwell
SamCaldwell
Flag of United States of America image

ASKER

I am currently runnning as administrator on a vista test machine.
Avatar of SamCaldwell
SamCaldwell
Flag of United States of America image

ASKER

Problem was resolved by adding the server to trusted sites and lowering the security settings for trusted sites.

While this is not a final solution it will work until I can tailor local security policies through the installer script to specifically allow only this specific HTA application to breach the perimeter of the system's security.
Avatar of SamCaldwell
SamCaldwell
Flag of United States of America image

ASKER

While the problem was a security issue, it was not the user account that corrected the problem, but rather the need to tailor local security policy or otherwise disable security features applicable to all users.

However, this suggestion did help to narrow the search--though ultimately the issue was deeper than user accounts.  Either way the response was appreciated.
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo