Welcome to WebmasterWorld Guest from 23.22.220.37

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)

New User

10+ Year Member

joined:Apr 18, 2004
posts:33
votes: 0


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 June 15, 2004 (gmt 0)

New User

10+ Year Member

joined:Apr 18, 2004
posts:33
votes: 0


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 June 15, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
posts:506
votes: 0


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

New User

10+ Year Member

joined:Apr 18, 2004
posts:33
votes: 0


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 June 16, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
posts:506
votes: 0


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 June 17, 2004 (gmt 0)

New User

10+ Year Member

joined:Apr 18, 2004
posts:33
votes: 0


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

New User

10+ Year Member

joined:Apr 18, 2004
posts:33
votes: 0


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 July 23, 2004 (gmt 0)

New User

10+ Year Member

joined:July 23, 2004
posts:3
votes: 0


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 July 25, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
posts:506
votes: 0


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 July 29, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Dec 6, 2002
posts:279
votes: 0

2:38 pm on July 30, 2004 (gmt 0)

New User

10+ Year Member

joined:July 23, 2004
posts:3
votes: 0


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 July 31, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Oct 28, 2002
posts:506
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members