• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3174
  • Last Modified:

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

Hi All,

I'm receiving and 'MSXML.dll Access is denied' with the following HTML.  Thanks for the help.

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>
0
paygo
Asked:
paygo
1 Solution
 
muzzy2003Commented:
It may well be that the ASPNET account don't have permissions on the folder containing MSXML4.dll. This is normally C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32 depending on Windows version. Check the directory permissions, and make sure that ASPNET has read/execute permissions on this directory.
0
 
paygoAuthor Commented:
Thanks - It works using a different site such as Yahoo.com - so I think the security is OK
0
 
muzzy2003Commented:
You mean with a different site's URL passed to your LoadPage function?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
paygoAuthor Commented:
yes - just replace  LoadPage("http://www.fidelity.com","yahoo");
with -  LoadPage("http://www.cnn.com","yahoo");

and this works.  wondering if fidelity.com is executing something not allowed here?

0
 
dthansenCommented:
I've seen this as well. It happens when you try to access a page that gets redirected elsewhere. In your example, http://www.fidelity.com get a redirect to https://www.fidelity.com.

We've been able to reproduce this error repeatedly.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now