Welcome to WebmasterWorld Guest from 54.166.152.121

Forum Moderators: ocean10000

Message Too Old, No Replies

MSXML2.XMLHTTP.4.0 --> Open "access denied"

Does not work when I upload the page to my web server

     
12:27 pm on Jun 14, 2004 (gmt 0)

10+ Year Member



Hello there,

I am using MSXML2.XMLHTTP.4.0 to retrieve data from an eternal web page (other domain) and displaying the contents in my local web page. This works perfectly when I run it from my local system. When I upload it to my Web Server and access it, then it does not work. The following is the code:

var objSrvHTTP;
objSrvHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
objSrvHTTP.open ("GET",theURL,false);

I am getting the "access denied" error exactly at the third line where the URL is passed. Can anyone help me with this?

Also, please let me know if there are any other methods to retrieve the data without using Msxml2.XMLHTTP.4.0.

Thank you!
aries

1:19 pm on Jun 15, 2004 (gmt 0)

10+ Year Member



Is it possible for creating a server-side object to perform the above task? Please let me know.

Thank you!
aries

2:26 pm on Jun 15, 2004 (gmt 0)

10+ Year Member



Try fetching a page from your domain. Might be something your host has blocked.
6:07 am on Jun 16, 2004 (gmt 0)

10+ Year Member



Duckhunter,

It is working pefectly fine, when I try to fetch a webpage present in my own domain. But, it does not work if I try to fetch a web page from an other domain. This is very important for me. Can you suggest something for this? Anything.

Thank you!
aries

1:41 pm on Jun 16, 2004 (gmt 0)

10+ Year Member



Can you open the remote URL in a browser on the box that is trying to do the post? What is the exact error you are getting? Try this to write out the error.

On Error Resume Next
objSrvHTTP.open ("GET",theURL,false);

If err.Number <> 0 Then
Response.write Err.Description
End If

5:14 am on Jun 17, 2004 (gmt 0)

10+ Year Member



Let me test it out using ASP and provide you the error. Please bear with me.
1:59 pm on Jun 17, 2004 (gmt 0)

10+ Year Member



I think I have got it. But, still some testing to be done. Anyway, thank you for your support. :)

Thank you!
aries

2:35 pm on Jul 23, 2004 (gmt 0)

10+ Year Member



Hi Aries,

I am having the exact same problem. What fix did you stmble upon. It would of great help if you can suggest something.

Thanks.

Regards.

10:27 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



What does the following return to you?

On Error Resume Next
theURL = "http://www.somedomain.com/page.asp"
objSrvHTTP.open ("GET",theURL,false);

If err.Number <> 0 Then
Response.write Err.Description
End If

12:11 am on Jul 29, 2004 (gmt 0)
2:38 pm on Jul 30, 2004 (gmt 0)

10+ Year Member



Thanks guys. My problem is slightly different. I am instantiating XMLHTTP object in javascript (maybe I am at wrong forum), I am using something like this...

var xmlHTTP = new ActiveXObject("Msxml2.XMLHTTP.4.0");
xmlHTTP.open("GET","https:/www.someurl.com", false);
var returnValue = xmlHTTP.responseText;

I am getting access denied error at line 2 at xmlHTTP.open call. Although this when I run locally (by giving file path instead of url) works well.

12:05 am on Jul 31, 2004 (gmt 0)

10+ Year Member



Have you tried fetching a page from your domain via http instead of the file path?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month