Select to view content in your preferred language

Can't get my data to show in Silverlight

1723
13
08-11-2010 05:25 PM
StephenLead
Honored Contributor
Hi everyone,

I need some help with a quick ArcGIS Server question. I'm running ArcGIS Server 10 on XP, with Visual Studio 2010 and Silverlight 4.

Everything is working correctly when using the sample ESRI servers, but I'm having problems with my Silverlight app seeing my ArcGIS Server services.

A simple example using a sample ESRI server is:

<UserControl x:Class="SilverlightApplication1.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="StreetMapLayer"
           Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
        </esri:Map>

    </Grid>
</UserControl>

This opens correctly and shows a world map. If I replace the URL line with Url="http://qsq-brcon15-pc/ArcGIS/rest/services/Atlas_geology/MapServer"/> the app opens and shows the "powered by ESRI" logo, but no map content is shown. If I open the Rest Services page, I can see that this is a valid tiled service (full details below). If I choose "View In ArcGIS JavaScript" the dataset displays correctly.

The same thing happens with Feature and Dynamic layers. It appears that Silverlight is installed correctly, and ArcGIS Server is working correctly, but for some reason they're not talking to each other.

Do you have any suggestions for how I can debug this?

Thanks,
Steve

ArcGIS Services Directory       Home > Atlas_geology (MapServer)   Help | API Reference     Atlas_geology (MapServer)


  View In:    ArcMap   ArcGIS Explorer   ArcGIS JavaScript   Google Earth   ArcGIS.com Map   Bing Maps (terms of use)

View Footprint In:    Google Earth

Service Description:

Map Name: Layers

All Layers and Tables 

Layers:


Tables:

Description:

Copyright Text:

Spatial Reference: 3857

Single Fused Map Cache: true

Tile Info:



  • Height: 256

  • Width: 256

  • DPI: 96

  • Levels of Detail: (# Levels: 5)

  • Format: PNG8

  • Compression Quality: 0

  • Origin:

    • X: -20037508.342787
      Y: 20037508.342787

  • Spatial Reference: 3857

Intial Extent:

    XMin: 15508279.4278146
    YMin: -4706251.94265085
    XMax: 17290879.84873
    YMax: -3103956.25669766
    Spatial Reference: 3857
Full Extent:

    XMin: 15625616.5270059
    YMin: -4571758.85384883
    XMax: 17173350.0728764
    YMax: -3206780.82949168
    Spatial Reference: 3857
Units: esriMeters

Supported Image Format Types: PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP

Document Info:



  • Title: Geology fGDB

  • Author: slead

  • Comments:

  • Subject:

  • Category:

  • Keywords:

  • Credits:

Supported Interfaces:    REST   SOAP

Supported Operations:    Export Map   Identify   Find   Generate KML
0 Kudos
13 Replies
DanielYague
Deactivated User
Hi, first of all sorry about my english, it´s not very good.

I´ve just begin with silverlight and i have a problem. I copied a sample from resource center arcgis, Silverlight.
Everything is working correctly when using the sample ESRI servers, but I'm having problems with my Silverlight app seeing my ArcGIS Server services.

<UserControl x:Class="ArcGISSilverlightSDK.DynamicAndTile"
    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"  WrapAround="True">
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer"
                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
                InitializationFailed="Layer_InitializationFailed" />
            <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer"
                Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/Map..."
                InitializationFailed="Layer_InitializationFailed" />
        </esri:Map>

    </Grid>
</UserControl>

I have a layer from arcgis server with this url=http://dyc1/ArcGIS/rest/services/capa_00/MapServer
and i want to change my layer instead of the ArcGISDynamisMapServiceLayer from the sample of esri. I doný know what´s happening but i can´t view anything.

I created a similar aplication with Flex and everything it´s correct.

I use my computer like localhost

capa_00 (MapServer)
View In:   ArcMap   ArcGIS Explorer   ArcGIS JavaScript   Google Earth   ArcGIS.com Map

View Footprint In:   Google Earth

Service Description:

Map Name: Layers

All Layers and Tables

Layers:

    T00 (0)

Tables:

Description:

Copyright Text:

Spatial Reference: 3857

Single Fused Map Cache: false

Intial Extent:

    XMin: -611147.199149999
    YMin: 4716576.82812215
    XMax: -311191.35945
    YMax: 4955538.86197786
    Spatial Reference: 3857

Full Extent:

    XMin: -612856.738324999
    YMin: 4753473.211725
    XMax: -311111.056175002
    YMax: 4918645.972775
    Spatial Reference: 3857

Units: esriMeters

Supported Image Format Types: PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP

Document Info:

    Title:
    Author:
    Comments:
    Subject:
    Category:
    Keywords:
    Credits:

Supported Interfaces:   REST   SOAP

Supported Operations:   Export Map   Identify   Find

Can anyone help me please?
i have the same problen as Steve

regards
0 Kudos
JenniferNery
Esri Regular Contributor
Did you download the SDK sample? http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Sample_Interactive_SDK/01660000000v000... Or are you copy-pasting code to a new silverlight app? Does it compile?

If your app runs just as the live sample but does not work when replaced with your service, you can refer to this blog post for trouble shooting blank layers: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx.
0 Kudos
ClintGarrison
Emerging Contributor
So, how do we fix the problem? I read the blog but it doesnt say how to fix it? Or am I missing something? I see the 2 errors /clientaccess.... and /crossdoamin.xml
but what do i do now?

Clint
0 Kudos
JenniferNery
Esri Regular Contributor
0 Kudos