homepage Welcome to WebmasterWorld Guest from 174.129.80.166
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
MSXML2.XMLHTTP.4.0 --> Open "access denied"
Does not work when I upload the page to my web server
aries




msg:955341
 12:27 pm on Jun 14, 2004 (gmt 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

 

aries




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

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

Thank you!
aries

duckhunter




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

Try fetching a page from your domain. Might be something your host has blocked.

aries




msg:955344
 6:07 am on Jun 16, 2004 (gmt 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

duckhunter




msg:955345
 1:41 pm on Jun 16, 2004 (gmt 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

aries




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

Let me test it out using ASP and provide you the error. Please bear with me.

aries




msg:955347
 1:59 pm on Jun 17, 2004 (gmt 0)

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

Thank you!
aries

treeTop




msg:955348
 2:35 pm on Jul 23, 2004 (gmt 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.

duckhunter




msg:955349
 10:27 pm on Jul 25, 2004 (gmt 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

webdevsf




msg:955350
 12:11 am on Jul 29, 2004 (gmt 0)

[support.microsoft.com...]

treeTop




msg:955351
 2:38 pm on Jul 30, 2004 (gmt 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.

duckhunter




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved