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>
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.

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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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

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
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
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
ASP

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.