?
Solved

Can't stop permission denied errors from Microsoft.XMLHTTP on live page

Posted on 2001-07-18
7
Medium Priority
?
1,240 Views
Last Modified: 2008-03-10
Hi,

I have some code in a page that will work great as a local file
but once I upload it to my server it generates "permission denied"
errors.

The relavent flawed code:

<script language="VBScript" type="text/vbscript">
Set xmlHTTP = CreateObject("Microsoft.XMLHTTP")
varDummy = xmlHttp.open("GET", "http://www.anypage.com/", true)
xmlHttp.send()
xmlDoc=xmlHttp.responseText
alert(xmlDoc)
</script>

It is important that this work on the client side on a live site, is
there anyway to achive this?

Any ideas, suggestions, links to sites that can help me would be greatly
appreciated.

Thanks,
Chris Craft
0
Comment
Question by:CJCraft
7 Comments
 
LVL 7

Expert Comment

by:John844
ID: 6295875
If the object is failing on the server side, then try:

Make sure that the MSXML objects are installed on the server.  They are installed with Windows 2000 (or
you can download them here (http://download.microsoft.com/download/xml/Install/3.0/WIN98Me/EN-US/msxml3.exe) for other operating systems):

The IUSR_<server machine name> user account will need to have permissions for this object.


If the error message is on the client side then you have bigger problems.  you cannot user createobject client side.  You will have to use object tags to define your object and then try to use it(I have never done this).
0
 
LVL 7

Author Comment

by:CJCraft
ID: 6295986
Hi,

Thanks for the tips. The error is coming from the client side and all of the script, vbscript, is being run from the client side also.

If I run it as a local file off my harddrive from say my desktop it will work fine but once I upload it to my web site it will generate the permission denied errors.

I thought you couldn't use Server.CreateObject on the client side but you could use CreateObject. It does seem to create the object. The line with CreateObject by itself doesn't get the error.

It seems to be related to the Internet Zone Security Level in IE. If I set it to low security, I can get it to work. And explains why it can work from the desktop too.

I'll try the object tags and maybe that will help.

Thanks again,
CJCraft
0
 
LVL 2

Expert Comment

by:MicOfLZ
ID: 6297007
hi cjcraft

I tried your code. after some time I got to get it working like this:

<script language="VBScript" type="text/vbscript">
     Set xmlHTTP = CreateObject("Msxml2.XMLHTTP")
     xmlHttp.open "GET", "http://www.kull.ch/default.asp", true
     xmlHttp.send
     alert(xmlHttp.responseText)
</script>

for me, there is no problem with default security in ie.

hope this helps
MicOfLZ
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
LVL 7

Author Comment

by:CJCraft
ID: 6298214
Hi,

Did you get it to work once you uploaded it to a Web site too? Your code works off my desktop but not off my Web site. For example, if you save the file to say http://www.kull.ch/test.asp do you get a access denied error then. If not please verify that you have default level security for Internet Zone in IE.

Thanks,
CJCraft
0
 
LVL 2

Accepted Solution

by:
MicOfLZ earned 1200 total points
ID: 6301237
I run the page from my webserver. The only error I get is the one because of the async = true.

Try this:

<script language="VBScript" type="text/vbscript">
    Set xmlHTTP = CreateObject("Msxml2.XMLHTTP")
    xmlHttp.open "GET", "http://www.kull.ch/default.asp", false
    xmlHttp.send
    alert(xmlHttp.responseText)
</script>

I have default security options in my IE.
0
 
LVL 4

Expert Comment

by:chabaud
ID: 6319218
Why don't you try something like this instead:

<HTML>

<xml id="oXml" src="http://www.anypage.com/" />

<script language="VBScript" type="text/vbscript">
     if oXml.readyState = "complete" then
          alert( oXml.xml)
     end if
</script>

</HTML>
0
 
LVL 27

Expert Comment

by:BigRat
ID: 6351471
Is this bit of script code sitting in an ASP page with runat=server mode?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…
Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question