MSXML4.dll: Access is denied. ActiveXObject("Msxml2.XMLHTTP.4.0") - Does anyone have a solution for this?</END>

Hi,

I am runnning the following code and receiving a 'msxml4.dll: Access is denied'.

Does anyone have the work around code for this? - Thanks - Here's the code:

<HTML>
  <HEAD>
</HEAD>
<body onload="init()">
<input value="view Yahoo" type="button" onclick="alert(document.getElementById('yahoo').innerHTML);">
<script>
function LoadPage(theURL,theID){
   var objSrvHTTP;
    try{
         objSrvHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
                  
     }
     catch(e){    
          try{
              objSrvHTTP = new ActiveXObject("Msxml2.XMLHTTP");
                  }
           catch(e){
               try{              
                            objSrvHTTP = new ActiveXObject("Microsoft.XMLHTTP");
                    alert("ok you have Microsoft.XMLHTTP")
               }                  
               catch(e){              
                    alert("you need install MSXML 4.0, http://www.microsoft.com/downloads/");
                    return;
               }    
          }
     }
       objSrvHTTP.open ("GET",theURL,false);
       objSrvHTTP.send ("");
       document.getElementById(theID).innerHTML=objSrvHTTP.responseText;
       document.all.FORM1.ihHTTP1.value=objSrvHTTP.responseText;
}

function init(){
 
     LoadPage("http://www.fidelity.com","yahoo");
 
}
</script>


<table width="555" cellspacing="0" cellpadding="0" border="3">
  <tr>
    <td valign="top" id="yahoo">nothing but net</td></ALETR>
  </tr>
  <tr>
    <td valign="top" id="ebay">nothing but net</td>
  </tr>
</table>

<TABLE><TR><TD>

<FORM id="FORM1" method=post runat="server">

<INPUT id=ihHTTP1 type=hidden size=-5 value=null name=iHTTP1 runat="server">
</FORM>

</TD>
</TR>
</TABLE>

</body>
</HTML>
paygoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

archrajanCommented:
You must have MSXML4 SP2 installed
0
archrajanCommented:

1.From the Start menu, click Run, type "mmc" and then press ENTER.
2. From the File menu, select Add/Remove Snap-In.
3. In Add/Remove Snap-In, click Add.
4. Add the "Group Policy" snap-in to the Console Root.
5. Select Local Computer Policy -> User Configuration -> Windows Settings -> Internet Explorer Maintenance -> Security
6. Click on "Security Zones and Content Ratings"
7. For "Security Zones and Privacy", select the "Import..." radio button and click "Modify Settings"
8. Set "Submit nonencrypted form data" to "Enable"
0
archrajanCommented:
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

archrajanCommented:
0
paygoAuthor Commented:
Thanks  archrajan,

I did this fix and still have the same problem. Should I use a different version of MSXML4.dll /
0
archrajanCommented:
do try that then :)
0
archrajanCommented:
sometimes Frontpage extensions prevent writing permissions
0
archrajanCommented:
check this post
0
archrajanCommented:
Try use MSXML2.ServerXMLHTTP.3.0 instead of MSXML2.ServerXMLHTTP.4.0
0
archrajanCommented:
0
paygoAuthor Commented:
Thanks - the xml works when the site site is changed.
change this
 LoadPage("http://www.fidelity.com","yahoo");
to
 LoadPage("http://www.yahoo.com","yahoo");
 


 
0
archrajanCommented:
good for you.. enjoy:)
0
devicCommented:
paygo, if you call http://www.fidelity.com it will redirected to https://www.fidelity.com/
HTTPS!
0
paygoAuthor Commented:
Thx - so why would that cause an MSXML4.dll access denied error?
0
devicCommented:
0
paygoAuthor Commented:
so- the redirect causes the problem. The redirect must occur after my server receives the first reply.
0
devicCommented:
if you do first request:

GET / HTTP/1.1

server answer is:
============
HTTP/1.1 302 Moved Temporarily
Server: Netscape-Enterprise/3.6
Date: Wed, 01 Dec 2004 04:57:47 GMT
Location: https://www.fidelity.com/
Content-length: 0
Connection: close
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
paygoAuthor Commented:
Thanks devic - So I should be able to see each reply in if I break at the  at the correct spot  and

view / interpret / reply to the the objSrvHTTP.responseText

If true, this could work for the difficulat sites - The One's that required Javascript enabled ..

before reposting logic.



0
devicCommented:
thank you,
this one should help you:http://www.blunck.info/iehttpheaders.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.