Error: File does not exist: crossdomain.xml in your server error logs

By: Emiley J Emailed: 1607 times Printed: 2078 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

As a webmaster, it is a good practice to monitor your webserver error logs to tweak or fine tune your server for better performance. The fact that you are reading this article shows that you are one of those responsible webmasters. :)

There are some errors that are not so obvious when you look at them. Such as this crossdomain.xml error.

Solution: To resolve this just follow these steps.

  1. First goto the root folder of your website.
  2. Create a file named crossdomain.xml (In linux run this command ‘touch crossdomain.xml’
  3. Add the following content to this file.
    In linux ‘vi crossdomain.xml’  and then paste these lines.
  4. <?xml version="1.0" ?>
    <cross-domain-policy>
      <site-control permitted-cross-domain-policies="master-only"/>
      <allow-access-from domain="*"/>
      <allow-http-request-headers-from domain="*" headers="*"/>
    </cross-domain-policy>
  5. Save the file.

 

That’s it. You will not see these errors again in your logs.

Reason: If you are wondering what this crossdomain.xml file does and why someone is accessing it, then readon.

A cross-domain policy file is an XML document that grants a web client—such as Adobe Flash Player, Adobe Reader, etc.—permission to handle data across multiple domains. When a client hosts content from a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain would need to host a cross-domain policy file that grants access to the source domain, allowing the client to continue with the transaction. Policy files grant read access to data, permit a client to include custom headers in cross-domain requests, and are also used with sockets to grant permissions for socket-based connections.

 

But you may be asking, I do not use any flash files in my server, then how does this happen. It is because, someone who has installed a Yontoo-based browser plugin is browsing your site. The browser plugin loads the dddWrapper.swf flash object, which in turn wants to fetch content from your domain. But to do this, it needs to access the cross-domain policy on your site, which is what the crossdomain.xml request is for.


xml Home | All xml Tutorials | Latest xml Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(1)


1. View Comment

The xml listed above will allow ANY domain to execute code, something that I would not want on my site. For me a better strategy is by default to disallow all domains, and adding on a case-by-case basis:

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="none"/>
</cross-domain-policy>


View Tutorial          By: Mark McWhirter at 2012-10-09 05:58:14

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Emiley J
Password must include both numeric and alphabetic characters - Magento
What is Hadoop?
Returning multiple values from a web service
Tomcat and httpd configured in port 8080 and 80
Java Webservices using Netbeans and Tomcat
Java WebService connected to Database
How to Deploy a Java Web Service
Call a webservice in Java
Java WebService - Create your first web service in Java
package javax.jws does not exist
Getting Started with Android
HTML5 Location - getCurrentPosition() in HTML5
HTML5 Canvas - Using Canvas in HTML5
HTML5 - Introduction
HTML5 Video - Handling video in HTML5

More Tutorials in xml
XML vs HTML
Error: File does not exist: crossdomain.xml in your server error logs
Error: File does not exist: labels.rdf in your server error logs
What is the structure of an XML?
XHTML Basics

More Latest News
Most Viewed Articles (in xml )
Error: File does not exist: crossdomain.xml in your server error logs
Error: File does not exist: labels.rdf in your server error logs
XML vs HTML
XHTML Basics
What is the structure of an XML?
Most Emailed Articles (in xml)
XML vs HTML
XHTML Basics
What is the structure of an XML?
Error: File does not exist: labels.rdf in your server error logs
Error: File does not exist: crossdomain.xml in your server error logs