Select to view content in your preferred language

Unhandled Error in Silverlight Application Code: 4004

6968
12
09-08-2010 11:29 AM
by Anonymous User
Not applicable
Unhandled Error in Silverlight Application Code: 4004

I am trying to follow the tutorial for my first SilverLight application - http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/help/index.html

I can hit the ESRI server with Silverlight fine.  But when I change it to my server I get the error - Unhandled Error in Silverlight Application Code: 4004

I have the clientaccesspolicy.xml and can browse to it.  I can see the listed services in the browser (Http://localhost/arcgis/rest/services)

There is nothing special going on here.  All I have is a map control ---

<UserControl x:Class="SilverlightApplication3.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"     
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <Grid x:Name="LayoutRoot" Background="White">

        <esri:Map x:Name="MyMap" DataContext="{Binding}">
            <esri:ArcGISTiledMapServiceLayer ID="Parcel"
           Url="http://localhost/ArcGIS/services/Test1/MapServer"/>
        </esri:Map>


    </Grid>
</UserControl>

--

I can add the service to an ArcMap project.

Any ideas would be welcome.
0 Kudos
12 Replies
prakshepjani
Deactivated User
Dear All,

I need help regarding above caption,

when i bind the local gis server map services it is giving error which is mentioned above title.
I had also read above solution and i have been done same  but still it is giving the error.
My Map URL is:- http://localhost/arcgis/rest/services/Test_Ser/MapServer
Pl. resolve this if possible.

Regards,
Prakshep Jani
GIS
Adani Group Co.
Ahmedabad.
0 Kudos
dotMorten_esri
Esri Notable Contributor
Did you really mean to put "localhost" in there? Remember that the Silverlight app will run on the client, so it will be whatever localhost means to the client, and not the server. You should have a fully qualified servername in there.
0 Kudos
prakshepjani
Deactivated User
Dear Friend,

I am putting fully qulified servername but still it is same.
Now URL is http://DT-106193/arcgis/rest/services/Test_ser/MapServer
And also i will hit this url in ie it will give footprint like arcgis online server.
But through silverlight app it will not done.
why ???

My Mainpage.xaml code:

<UserControl x:Class="SilverlightApplication1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client">
<Grid x:Name="LayoutRoot">
<esri:Map Name="MyMap">
<esri:ArcGISTiledMapServiceLayer ID="Map1" Url="http://DT-106193/ARCGIS/rest/services/Test_Ser/MapServer"/>
</esri:Map>
</Grid>
</UserControl>

Help me!!!!
0 Kudos