<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Re-adding Bing Service produces &amp;quot;Could not find endpoint element with name.... in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704210#M18104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have not seen this particular exception but I think this might be a related thread: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/34564-Change-map-based-on-runtime-with-Silverlight-API" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/34564-Change-map-based-on-runtime-with-Silverlight-API&lt;/A&gt;&lt;SPAN&gt;. When replacing base layer, since it defines the Map.Extent and SpatialReference, you can unset them before before replacing with new layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 May 2012 18:18:10 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2012-05-22T18:18:10Z</dc:date>
    <item>
      <title>Re-adding Bing Service produces &amp;amp;quot;Could not find endpoint element with name....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704209#M18103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a tool that lets users swap a base map.&amp;nbsp; If I start the map loaded with a tiled map layer, then switch to the Bing base map layer I get an error message when adding the Bing base map layer to my Layers collection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error message is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could not find endpoint element with name 'BasicHttpBinding_IImageryService' and contract 'ImageryService.IImageryService' in the ServiceModel client configuration section.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It works fine if I load Bing right off the bat.&amp;nbsp; It works fine switching between different Bing map types, and works fine switching from Bing to my custom tiled service.&amp;nbsp; I only get this exception when switching from a custom tiled service to Bing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is using the SL 3.0 RC version.&amp;nbsp; I have not tried it in any previous versions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; &amp;nbsp; private void SwapTheBaseMap(bool bResetExtent, ESRI.ArcGIS.Client.Bing.TileLayer.LayerType layertypeEnum, string token) &amp;nbsp; {&amp;nbsp; &amp;nbsp;&amp;nbsp; ViewableMapServices.Clear();&amp;nbsp; &amp;nbsp;&amp;nbsp; if (bResetExtent) ZoomToGeometry = null; //Tell the map to clear its extent using a custom extension on the Map class&amp;nbsp; &amp;nbsp;&amp;nbsp; //Add Base Map &amp;nbsp;&amp;nbsp; if (token != null) &amp;nbsp;&amp;nbsp; {&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.Client.Bing.TileLayer tileLayer = new ESRI.ArcGIS.Client.Bing.TileLayer() &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID = "BingLayer", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LayerStyle = layertypeEnum, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerType = ESRI.ArcGIS.Client.Bing.ServerType.Production, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Token = token &amp;nbsp;&amp;nbsp;&amp;nbsp; }; &amp;nbsp;&amp;nbsp;&amp;nbsp; tileLayer.InitializationFailed += (o, e) =&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //don't throw an exception, we log it instead &amp;nbsp;&amp;nbsp;&amp;nbsp; };&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ViewableMapServices.Add(tileLayer); //this is where it throws the error &amp;nbsp;&amp;nbsp; }&amp;nbsp; &amp;nbsp;&amp;nbsp; //Call a function that re-adds non base map layers &amp;nbsp;&amp;nbsp; AddOperationalLayers();&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone seen this exception before?&amp;nbsp; I can provide the stack trace if that is helpful.&amp;nbsp; This is the last non-Microsoft call in the stack trace for the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ESRI.ArcGIS.Client.Bing!ESRI.ArcGIS.Client.Bing.ImageryService.ImageryServiceClient.ImageryServiceClient(string endpointConfigurationName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 May 2012 19:52:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704209#M18103</guid>
      <dc:creator>NicoleSchmidt</dc:creator>
      <dc:date>2012-05-20T19:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re-adding Bing Service produces "Could not find endpoint element with name....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704210#M18104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have not seen this particular exception but I think this might be a related thread: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/34564-Change-map-based-on-runtime-with-Silverlight-API" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/34564-Change-map-based-on-runtime-with-Silverlight-API&lt;/A&gt;&lt;SPAN&gt;. When replacing base layer, since it defines the Map.Extent and SpatialReference, you can unset them before before replacing with new layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 18:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704210#M18104</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2012-05-22T18:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Re-adding Bing Service produces "Could not find endpoint element with name....</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704211#M18105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was going to get on here and post again and mention that I do get the Bing map to show up every time now (you are right, it was related to now properly clearing the extent and Spatial Reference).&amp;nbsp; I still occasionally get that exception in debug when I have exceptions set to be thrown even when handled, but the bing map shows up so I have what I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 18:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/re-adding-bing-service-produces-amp-amp-quot-could/m-p/704211#M18105</guid>
      <dc:creator>NicoleSchmidt</dc:creator>
      <dc:date>2012-05-22T18:24:43Z</dc:date>
    </item>
  </channel>
</rss>

