access denied to xml on another machine

  • Thread starter Thread starter serdar Sultanoglu
  • Start date Start date
S

serdar Sultanoglu

Hello,
My HTML page loads and alerts an XML document on another machine. If I
request the page by machine name or localhost there is no problem. If
i request by IP access denied error occurs.

I think this is because of that only the documents on same machine can
be loaded.
Is there any way to load xml documents from another machine?
Thanks,

here is my HTML page

<html>
<body>
<script type = text/javascript>
var xml=new ActiveXObject("Microsoft.XMLDOM")
xml.async=false
xml.load("http://195.174.145.91/xml/1.xml")
alert(xml.xml)
</script>

</body>
</html>


if URL of HTML :
http://localhost/1.html --> OK
http://serdar/1.html --> OK
http://198.147.166.110/1.html --> access is denied
 
serdar Sultanoglu wrote:

My HTML page loads and alerts an XML document on another machine. If I
request the page by machine name or localhost there is no problem. If
i request by IP access denied error occurs.

I think this is because of that only the documents on same machine can
be loaded.
Is there any way to load xml documents from another machine?
Thanks,

here is my HTML page

<html>
<body>
<script type = text/javascript>
var xml=new ActiveXObject("Microsoft.XMLDOM")
xml.async=false
xml.load("http://195.174.145.91/xml/1.xml")
alert(xml.xml)
</script>

If you load a page with a script from a HTTP URL then you can with the
normal security settings only access data sources from the same server
the page is loaded from. I think you can change that setting, it is
named somehow alike "Allow access to data sources across domains".
 
Not XML issue but cross-domain access violation. Do the same in server-side
script on the same domain, and get it from the client-side on the same
domain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top