3

I know very little of xml, almost nothing and now I've to deal with a website which allows me to upload any kind of file, but when I visit the link that points to that file I see this message

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>56D9E6D5AB81C7F8</RequestId>
<HostId>
bbhO3UnotoXA8qS8aMbKHhPdjGIwegs6dfX5cPJ7yZS7hRaDTuacjPhaPY4WH/vYXuOBfgCm23o=
</HostId>
</Error>

This means that the server is proposing content as xml but if I upload an xml file, the server will give me the same message. But actually what I don't understand is what's that "AccessDenied"... I don't know where I can start to understand considering that I don't have access to that server. Now I would like to know what is happening exactly, what's the logic behind all this?

Community
  • 1
  • 1
Giacomo Cerquone
  • 2,352
  • 5
  • 24
  • 33

2 Answers2

4

I faced this very error when trying to access a file from AWS's S3 bucket. Turns out, I just had to make that file public. (Though keep in mind, making a file public comes with obvious security risks)

Vishist Varugeese
  • 1,500
  • 1
  • 17
  • 30
2

You will get this error in the client side when the client (the webbrowser) for some reason interprets the HTTP response content as text/xml instead of text/html and the parsed XML tree doesn't have any XML-stylesheet.

Opening Facelets page errors with "This XML file does not appear to have any style information associated with it."

Community
  • 1
  • 1
vvg
  • 6,325
  • 19
  • 36
  • I already read that answer and in fact the server is forcing somehow the browser to render that file as text/xml. But so why if I give an xml file to it, the server response is the same? – Giacomo Cerquone Oct 31 '15 at 13:13
  • how exactly do you give xml to server? do you use some upload form? – vvg Oct 31 '15 at 13:16
  • Yes, I use an upload form and after I take the direct link to the file that continues to have the same .xml extension – Giacomo Cerquone Oct 31 '15 at 13:18