silverlight cann't display a Arcgis map service,already copy the file

2589
4
08-14-2012 06:30 AM
XINGMIN
New Contributor
i have publiched an ArcGis map service using Arcgis server installed on

my own computer,the map service runs correctly in the Arcgis Server Manager

(can see the little map when you expand the service node).But a new-builded

silverlight application can not display the map!i have already copy the

fileclientaccesspolicy.xml to the web server(IIS) root dictionary:

C:\inetpub\wwwroot,the following is the XAML:
<UserControl x:Class="SilverlightApplication.MainPage"   
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
  xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
  <Grid x:Name="LayoutRoot">
    <esri:Map x:Name="MyMap" >
      <esri:ArcGISTiledMapServiceLayer ID="MyMapLayer"   
        Url="http://minxing/ArcGIS//services/binhai/MapServer"/>
    </esri:Map>
  </Grid>
</UserControl>
   thanks very much!
0 Kudos
4 Replies
JMcNeil
Occasional Contributor III
When you hit the rest end point

http://yourservername/arcgis/rest/services

and click on the service you published

Then click View In ArcGIS JavaScript

Can you see the map with that?  Can you view the source code?  If you can then I think it might be your silverlight app code.

Jay
0 Kudos
JMcNeil
Occasional Contributor III
YOu have two slashes in you address

http://minxing/ArcGIS//services/binhai/MapServer

I also think you need to add the word rest

http://minxing/ArcGIS/rest/services/binhai/MapServer

Jay
0 Kudos
XINGMIN
New Contributor
YOu have two slashes in you address 

http://minxing/ArcGIS //services/binhai/MapServer 

I also think you need to add the word rest 

http://minxing/ArcGIS/rest/services/binhai/MapServer

Jay


I really appreciate you.my problem have already been handled.THANKS VERY MUCH!
i made a mistake when writing here using "//" after "ArcGIS",but it is right in my program xaml file.
i followed you step to "view in ArcGIS Javascript" then see the javascript code .i found that it used the "ArcGISDynamicMapServiceLayer" but not "ArcGISTiledMapServiceLayer".i changed my xaml code following it and also add "rest",then i saw the Map!
Thanks again! but i can not understand why it must be "ArcGISDynamicMapServiceLayer".do you know that?
0 Kudos
XINGMIN
New Contributor
I really appreciate you.my problem have already been handled.THANKS VERY MUCH!
   i made a mistake when writing here using "//" after "ArcGIS",but it is right in my program xaml file.
   i followed you step to "view in ArcGIS Javascript" then see the javascript code .i found that it used the "ArcGISDynamicMapServiceLayer" but not "ArcGISTiledMapServiceLayer".i changed my xaml code following it and also add "rest",then i saw the Map!
    Thanks again! but i can not understand why it must be "ArcGISDynamicMapServiceLayer".do you know that?


    I got the distinguish between the two layers now.
    Jay,thank you so much!
0 Kudos