Access policy file is not being requested during MAP service call

2547
7
01-22-2014 01:07 AM
AnatoliiTerentiev
Occasional Contributor III
Dear Gurus!

I have Windows Server 2008 with installed arcgis 10.1 for server, also I have installed Map service. Additionally, I request few services from service.arcgisonline.com - topography and satellite images.
When you access those services from arcgisonline - clientaccesspolice.xml is being requested and both services displayed normally. When I try to access my service - from one computer everything is fine: clientaccesspolicy is being requested and map is displayed normally, but from other computers - silence - there is no request for clientaccesspolice.xml ( atleast fiddler doesn't show anything ) - and there is no request to service
What causes this problem?
0 Kudos
7 Replies
JustinCornell
New Contributor III
Here is my shot in the dark since no one else have given input. 

I had the same problem with some of my computer from inside my company a year or so ago.  I was getting a security exception because the request for the xml file was not going through.  It turned out that our company proxy at the time (BlueCoat) was blocking and or caching the request so it was not being sent.  We needed up having to put proxy rules in place to tell the proxy to not cache anything coming from the arcgisonline domain.  Once the rule was in place it worked for us.

One thing that worked for me was paste the url of the clientaccesspolicy.xml file and browser and go to it.  Once that loaded I was able to browse to my application in the same browser session and it worked.  If this works then I would say it might be a proxy or firewall issue.

Let me know what you find out.
0 Kudos
JustinCornell
New Contributor III
Here is my shot in the dark since no one else have given input. 

I had the same problem with some of my computer from inside my company a year or so ago.  I was getting a security exception because the request for the xml file was not going through.  It turned out that our company proxy at the time (BlueCoat) was blocking and or caching the request so it was not being sent.  We needed up having to put proxy rules in place to tell the proxy to not cache anything coming from the arcgisonline domain.  Once the rule was in place it worked for us.

One thing that worked for me was paste the url of the clientaccesspolicy.xml file and browser and go to it.  Once that loaded I was able to browse to my application in the same browser session and it worked.  If this works then I would say it might be a proxy or firewall issue.

Let me know what you find out.
0 Kudos
AnatoliiTerentiev
Occasional Contributor III
My code:
                                                   
           Url="http://monitor:6080/ArcGIS/rest/services/serviceName/MapServer" />

where - "monitor" - name of the computer in intranet.
From any computer I see service (in attachment) and in ArcGIS.com  map of the service is visible too.
ArcGIS server is behind the router, and I did port forwarding on 80 and 6080 port.
0 Kudos
AnatoliiTerentiev
Occasional Contributor III
I see my layer in arcgisonline.com only from  computer, on which I see layer from my program. And on other computers I do  not see my layer from my program and in arcgisonline.com, when trying to see my layer, I get error message - "Layer rk did not answer and can't be added to the map"
0 Kudos
AnatoliiTerentiev
Occasional Contributor III
Problem solved with replacing domen name of the computer with FQDN.
0 Kudos
AnatoliiTerentiev
Occasional Contributor III
Dear Guru!
Again faced with the problem associated with the cross domain access.
There is a server (windows server 2008 R2), which are web and mssql server, and arcgis for server 2010.1.
I try to put web-server and mssql-server on  another server and  GIS services use from the previous server.
From four computers gis services opens well - I see  fiddler request crossdomain.xml file and layers appear. But from one computer get the error message:
"User agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Time: Tue, 15 Apr 2014 12:09:15 UTC

Message: Unhandled Error in Silverlight Application A security exception occured while trying to connect to the REST endpoint. Make sure you have a cross domain policy file available at the root for your server that allows for requests from this application. в ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e)
в ESRI.ArcGIS.Client.Layer.Initialize()
в ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.<>c__DisplayClass26.<MapServiceInfoInitFailed>b__24()


My crossDomain.xml:
<?xml version="1.0" encoding="utf-8" ?> 
<access-policy>
 <cross-domain-access>
  <policy>
   <allow-from http-request-headers="*">
    <domain uri="*"/>
   </allow-from>
   <grant-to>
    <resource path="/" include-subpaths="true"/>
   </grant-to>
  </policy>
 </cross-domain-access>
</access-policy>

And xaml:
    <esri:OverviewMap.Layer>
   <esri:ArcGISDynamicMapServiceLayer Url="http://xxx.karelia.ru:6080/ArcGIS/rest/services/streetRK/MapServer" />
</esri:OverviewMap.Layer>

In fiddler I see nothing when try to request layer from this computer. When I try to do the same from other computers I see requests of crossdomain.xml file and services works well.
All computers, from which all work fine and computers, from requests don't work, opens site through the same router with white IP.

How to fix, any ideas?
0 Kudos
AnatoliiTerentiev
Occasional Contributor III
P.S.
1.Some details of the deployment. I write the solution to the server and as a physical way of site I point the way to the web project , in which crossdomain and clientaccesspolicy.xml files are.
2. When I run my solution from my computer (from wich I can't access gis services from browser) - all works fine.
0 Kudos