Crossdomain.xml Issues

3726
4
09-27-2010 02:22 PM
MatthewBullock
New Contributor III
I have a flex app that is running on a server that functions both as our web server and our GIS server. I did not think that I would need to set up a crossdomain.xml file on the server because the flex project is running as a virtual directory in the root domain (http://xxx.com/flexproject). The ArcGIS Server map services are coded as http://xxx.com/ArcGIS/rest/services/MapServices/XXX/MapServer in the app, so when a user enters Http://xxx.com/flexproject they are able to view the ArcGIS services. However, when a user enters http://www.xxx.com/flexproject the flex app loads but the ArcGIS services are unavailable.

I created a crossdomain.xml file and put both domains in it (i.e. www and non-www) and put it in the wwwroot of the web server (http://xxx.com/crossdomain.xml), but when I navigate to the file I get a Http 401.3 error - unauthorized access. If I put the same file in a folder within the wwwroot (http://xxx.com/xxx/crossdomain.xml) the source is viewable.

Is there a setting I am missing in the default web page properties to make .xml files accessible?

Any help is greatly appreciated.
Tags (2)
0 Kudos
4 Replies
BjornSvensson
Esri Regular Contributor
The crossdomain file is not needed when a user access the app as http://example.com/flexviewer and the services listed in the config.xml are on http://example.com/.

When a user access the app at http://www.example.com/flexviewer (and the config is as above), then Flash Player will treat http://www.example.com/ as different from http://example.com/ and thus look for the crossdomain file.

The crossdomain file needs to be in the root.  The 401.3 problem is what you need to fix.  What web server are you using?  If you are using IIS 5.0, 5.1 or 6.0, then http://support.microsoft.com/kb/271071/ might help 🙂
0 Kudos
MatthewBullock
New Contributor III
Thanks Bjorn,

We are using IIS 6.0. I'll check out that Microsoft help page.


The crossdomain file is not needed when a user access the app as http://example.com/flexviewer and the services listed in the config.xml are on http://example.com/.

When a user access the app at http://www.example.com/flexviewer (and the config is as above), then Flash Player will treat http://www.example.com/ as different from http://example.com/ and thus look for the crossdomain file.

The crossdomain file needs to be in the root.  The 401.3 problem is what you need to fix.  What web server are you using?  If you are using IIS 5.0, 5.1 or 6.0, then http://support.microsoft.com/kb/271071/ might help 🙂
0 Kudos
AndyGup
Esri Regular Contributor
Cross-domain issues are very common. So, if anyone else has trouble with them check out these blog posts as a starting point: http://blogs.esri.com/Dev/blogs/arcobjectsdevelopment/archive/tags/cross-domain/default.aspx
0 Kudos
MatthewBullock
New Contributor III
Thanks for the response. I was able to solve my problem. The crossdomain.xml file did not have access granted to the IIS_WPG and Internet Guest Account (IUSR_servername) accounts. Everything works now, after I set those accounts to have the proper settings


Cross-domain issues are very common. So, if anyone else has trouble with them check out these blog posts as a starting point: http://blogs.esri.com/Dev/blogs/arcobjectsdevelopment/archive/tags/cross-domain/default.aspx
0 Kudos