RelatedCode, Click here
This error is inexplicable today.
Do you want to call this page?
This page contains some errors that may prevent the page from being correctly displayed or running. If you do not want to test the page now, click "no ".
Error: the object is missing.
After checking the code multiple times, you can't see any problems. ThenAdd the initializationfailed attribute to the above layer.
Front-end code
< Usercontrol X: Class = "Apiforsilverlightsamp. S2"
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" >
< Grid X: Name = "Layoutroot" Background = "White" >
< ESRI: Map X: Name = "Mymap" >
< ESRI: map. Layers >
< ESRI: arcgistiledmapservicelayer ID = "Layerworldmap" Initializationfailed = "Arcgistiledmapservicelayer_initializationfailed"
URL = "Http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer" />
</ ESRI: map. Layers >
</ ESRI: Map >
</ Grid >
</ Usercontrol >
Background code
Private VoidArcgistiledmapservicelayer_initializationfailed (ObjectSender, eventargs E)
{
ESRI. ArcGIS. Client. layer Layer=SenderAsESRI. ArcGIS. Client. layer;
MessageBox. Show (layer. initializationfailure. tostring ());
}
The following prompt is displayed:
when I saw this prompt, I suddenly realized that I was calling the services provided by ESRI, but my current network access was restricted (at the company, I had to open Baidu, msdn, and other websites before ten o'clock A.M, google doesn't open it either. I don't know what the leader thinks about it, You know ). After, access is completely normal.