Error: layer failed to load: Fault code: Channel.Security.Error

Error Message

When an ArcGIS Viewer for Flex query is created and the query URL points to 'localhost', the following error is returned:

"<layer name> layer failed to load: Fault code:

Fault info: Security error accessing url

Fault details: Destination: DefaultHTTP"


There are several possible causes for this error:

• The ArcGIS Viewer for Flex is using a URL referencing a 'localhost' instead of the machine name.
• Incorrect URL in the ArcGIS Viewer for Flex config.xml file.
• The ArcGIS for Server crossdomain.xml file points to the wrong IP address or machine name.
• The HOSTS file on the client machine accessing the ArcGIS for Server machine name could not be resolved.
• There are conflicts with the federation of ArcGIS for Server with Portal for ArcGIS.
• Internet Information Service (IIS) settings on ArcGIS for Server allow client certificates to be accepted.

Solution or Workaround

• Use the correct URL that is referencing the service in the ArcGIS Viewer for Flex URL instead of 'localhost'.


• Modify the config.xml file to include the correct fully qualified domain name (FQDN).

a. Navigate to C:\Inetpub > wwwroot > flexviewer > config, open the config.xml file with a text-based editor such as Notepad, and modify the URL parameter to include a FQDN.


b. Save the changes, and close Notepad.

• The ArcGIS server servicing ArcGIS Viewer for Flex queries must have a crossdomain.xml file in the root directory; this is a prerequisite that allows remote access to those services. The crossdomain file must point to a URL with an appropriate machine name or IP address. The following guide describes the use of a crossdomain file, ArcGIS API for Flex: Using crossdomain.xml.

• On the client machine, navigate to Windows > System32 > drivers > etc, open the HOSTS file with Notepad and edit the file to include the server machine's IP Address along with its corresponding machine name.
The workaround above is for a local machine. This must be done at the domain level to remove any further conflicts with machine name and IP address resolution.

• Remove ArcGIS for Server and Portal for ArcGIS federation. Restart the server.

• Check that IIS settings are configured correctly.
a. From the Windows Start search option, type IIS to bring up the IIS Manager, and click the IIS Manager.
b. Navigate to Sites > Default Web Site > flexviewer, and open SSL Settings.

c. Check that the client certificates settings are set to Ignore. Click Apply, and close IIS Manager.

This is an ArcGIS for Server site-level setting and cannot be applied from a local machine. If this functionality is unavailable, please contact an IT administrator for assistance.

Technical support is available through June of 2016, however maintenance of ArcGIS Viewer for Flex has been discontinued. The following blog describes Esri's focus on promoting Web AppBuilder for ArcGIS as a replacement for Flex, Support Services Blog: Final Release and Support Plan for the ArcGIS APIs / Viewers for Flex and Silverlight.

Related Information