Reg : using local map service

1887
3
09-07-2010 09:18 PM
VikramS
Occasional Contributor
Hi all ,

I am trying to use local map service in silverlight

<Grid x:Name="LayoutRoot" Background="White">
        <esri:Map Name="test" >
            <esri:Map.Layers>
                <esri:ArcGISDynamicMapServiceLayer x:Name ="mymap" Url="http://localhost/arcgis/services/test/MapServer"/>
            </esri:Map.Layers>
        </esri:Map>
           </Grid>

I am getting an exception as "Failed to initialize ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer : 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."

Can anybody help me and let me know what is the problem . Thanks
0 Kudos
3 Replies
AndrewChapkowski
Esri Regular Contributor
You need to add a cross domain policy file to your server.

Check out the link below to get an example of the a cross domain policy file.
http://resources.arcgis.com/content/kbase?fa=articleShow&d=37035
0 Kudos
VikramS
Occasional Contributor
Hello Sir ,

I did as it has been mentioned in the link u provided. I am able to list the services with this url https://epps65335.campus.ad.utdallas.edu/arcgis/rest/services. When i access any one of the service . the url changes to http://epps65335.campus.ad.utdallas.edu/ArcGIS/rest/services/Crime/MapServer and hence i get an error to change http to https . How can i change the services url to https .  Help me . Thanks
0 Kudos
by Anonymous User
Not applicable
Hi all ,  

I am trying to use local map service in silverlight  

<Grid x:Name="LayoutRoot" Background="White"> 
<esri:Map Name="test" > 
<esri:Map.Layers> 
<esri:ArcGISDynamicMapServiceLayer x:Name ="mymap" Url="  http://localhost/arcgis/services/test/MapServer"/> 
</esri:Map.Layers> 
</esri:Map> 
</Grid> 

I am getting an exception as "Failed to initialize ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer : 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." 

Can anybody help me and let me know what is the problem . Thanks



Your Url must be rest service. Change your url like this: http://localhost/arcgis/rest/services/test/MapServer
0 Kudos