Solved

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

Posted on 2001-07-18
7
1,211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

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

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Suggested Courses

752 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