# Smartmap Service error while getting tiles

**URL:** <https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040>\
**Category:** Silverlight\
**Created:** [August 21, 2014, 12:42am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040 "2014-08-21T00:42:00Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 21, 2014, 12:42am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/1 "2014-08-21T00:42:00Z")

</div>

Hello,  
  
  
  
recently&nbsp;I&nbsp;got&nbsp;some&nbsp;exception&nbsp;while&nbsp;debugging&nbsp;using&nbsp;visual&nbsp;studio.&nbsp;IE&nbsp;sometimes&nbsp;show&nbsp;javascript&nbsp;error.  
  
after&nbsp;I&nbsp;checked&nbsp;using&nbsp;fiddler&nbsp;this&nbsp;is&nbsp;what&nbsp;i&nbsp;found.  
  
  
  
[![](https://community.thinkgeo.com/uploads/default/original/2X/3/3f02f2b978e9d7c69b7547c0aa590af0d670e3fb.png)](http://thinkgeo.com/forums/DesktopModules/ActiveForums/viewer.aspx?portalid=1&moduleid=623&attachid=6287)  
  
  
  
I&nbsp;found&nbsp;some&nbsp;differences&nbsp;between&nbsp;successfull&nbsp;request&nbsp;and&nbsp;failed&nbsp;one.  
  
  
  
below&nbsp;is&nbsp;a&nbsp;correct&nbsp;request&nbsp;url&nbsp;(does&nbsp;not&nbsp;return&nbsp;exception)

> `<a href="localhost" tabindex="0">localhost</a>:8910/SmartMap/GeoTile.axd?BBOX=115.191650390625,-8.7451171875,115.20263671875,-8.734130859375&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/jpeg&SRS=EPSG:4326&PAGENAME=iProTax.SmartMap&EXTRA=&OVERLAYID=ServerOverlay5103010001jl&CONNECTOR=SmartMapConnector&&WIDTH=256&HEIGHT=256&UNIT=DecimalDegree&SCALE=18023.4310913086`

  
  
  
I&nbsp;notice&nbsp;that&nbsp;in&nbsp;above&nbsp;url&nbsp;the&nbsp;"OVERLAYID"&nbsp;and&nbsp;"CONNECTOR"&nbsp;query&nbsp;string&nbsp;values&nbsp;are&nbsp;present&nbsp;and&nbsp;has&nbsp;correct&nbsp;value,  
  
But,&nbsp;when&nbsp;exception&nbsp;happens,&nbsp;this&nbsp;is&nbsp;the&nbsp;url  
  

> `<a href="localhost">localhost</a>:8910/SmartMap/GeoTile.axd?BBOX=115.15869140625,-8.7451171875,115.169677734375,-8.734130859375&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&FORMAT=image/jpeg&SRS=EPSG:4326&PAGENAME=iProTax.SmartMap&EXTRA=&OVERLAYID=14b86d55-fde7-4e9e-8091-e9962b50a63b&CONNECTOR=&&WIDTH=256&HEIGHT=256&UNIT=DecimalDegree&SCALE=18023.4310913086`

  
you&nbsp;can&nbsp;see&nbsp;from&nbsp;the&nbsp;request&nbsp;that&nbsp;"OVERLAYID"&nbsp;value&nbsp;is&nbsp;some&nbsp;GUID&nbsp;string,&nbsp;and&nbsp;"CONNECTOR"&nbsp;value&nbsp;is&nbsp;empty.  
  
  
  
  
  
anybody&nbsp;knows&nbsp;what&nbsp;is&nbsp;wrong?

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [August 22, 2014, 2:16am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/2 "2014-08-22T02:16:49Z")

</div>

Hi&nbsp;Syarief,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Are&nbsp;you&nbsp;using&nbsp;our&nbsp;ServerLayerOverlay?&nbsp;I&nbsp;view&nbsp;the&nbsp;code&nbsp;and&nbsp;find&nbsp;the&nbsp;default&nbsp;value&nbsp;for&nbsp;it&nbsp;assign&nbsp;a&nbsp;random&nbsp;GUID&nbsp;to&nbsp;"Connector"&nbsp;and&nbsp;empty&nbsp;string&nbsp;to&nbsp;"overlayid".&nbsp;  
&nbsp;&nbsp;  
&nbsp;So&nbsp;the&nbsp;different&nbsp;should&nbsp;be&nbsp;caused&nbsp;by&nbsp;the&nbsp;process&nbsp;abort&nbsp;after&nbsp;ServerLayerOverlay&nbsp;initialized.&nbsp;I&nbsp;am&nbsp;not&nbsp;sure&nbsp;where&nbsp;is&nbsp;the&nbsp;problem&nbsp;but&nbsp;if&nbsp;there&nbsp;are&nbsp;some&nbsp;code&nbsp;should&nbsp;be&nbsp;helpful&nbsp;for&nbsp;research&nbsp;it.&nbsp;  
&nbsp;&nbsp;  
&nbsp;And&nbsp;is&nbsp;the&nbsp;Smartmap&nbsp;a&nbsp;third&nbsp;part&nbsp;service?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 22, 2014, 3:42am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/3 "2014-08-22T03:42:11Z")

</div>

Hi&nbsp;Don,  
  
  
  
yes&nbsp;I’m&nbsp;using&nbsp;ServerLayerOverlay,  
  
  
  
actually&nbsp;what&nbsp;you&nbsp;see&nbsp;in&nbsp;the&nbsp;code&nbsp;tag&nbsp;is&nbsp;the&nbsp;URL&nbsp;request&nbsp;that&nbsp;I&nbsp;copied&nbsp;from&nbsp;fiddler.&nbsp;it’s&nbsp;not&nbsp;my&nbsp;code&nbsp;logic.  
  
from&nbsp;the&nbsp;image&nbsp;I&nbsp;attach,&nbsp;you&nbsp;could&nbsp;see&nbsp;there&nbsp;is&nbsp;“Result”&nbsp;column,&nbsp;and&nbsp;there&nbsp;are&nbsp;values&nbsp;200&nbsp;(HTTP&nbsp;OK)&nbsp;and&nbsp;500&nbsp;(HTTP&nbsp;Internal&nbsp;Server&nbsp;Error).  
  
I&nbsp;just&nbsp;put&nbsp;one&nbsp;URL&nbsp;request&nbsp;from&nbsp;200&nbsp;(OK),&nbsp;and&nbsp;from&nbsp;500&nbsp;(Server&nbsp;error),&nbsp;and&nbsp;that’s&nbsp;actually&nbsp;what&nbsp;you&nbsp;see&nbsp;inside&nbsp;code&nbsp;tag.  
  
  
  
SmartMap&nbsp;is&nbsp;only&nbsp;folder&nbsp;name&nbsp;where&nbsp;i&nbsp;put&nbsp;my&nbsp;aspx&nbsp;page&nbsp;to&nbsp;load&nbsp;my&nbsp;silverlight&nbsp;app.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [August 25, 2014, 2:50am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/4 "2014-08-25T02:50:11Z")

</div>

Hi&nbsp;Syarief,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;let&nbsp;me&nbsp;know&nbsp;the&nbsp;detail.&nbsp;  
&nbsp;&nbsp;  
&nbsp;My&nbsp;problem&nbsp;is&nbsp;whether&nbsp;I&nbsp;can&nbsp;reproduce&nbsp;the&nbsp;500&nbsp;error&nbsp;in&nbsp;our&nbsp;HowDoISample&nbsp;or&nbsp;need&nbsp;I&nbsp;create&nbsp;another&nbsp;project&nbsp;for&nbsp;that?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Because&nbsp;I&nbsp;tried&nbsp;Fiddler&nbsp;today&nbsp;and&nbsp;haven’t&nbsp;found&nbsp;the&nbsp;500&nbsp;error&nbsp;with&nbsp;our&nbsp;sample&nbsp;project.&nbsp;  
&nbsp;&nbsp;  
&nbsp;So&nbsp;I&nbsp;think&nbsp;I&nbsp;need&nbsp;reproduce&nbsp;that&nbsp;first.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 25, 2014, 6:20am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/5 "2014-08-25T06:20:49Z")

</div>

Hi&nbsp;Don,  
  
  
  
maybe&nbsp;you&nbsp;can&nbsp;reproduce&nbsp;it&nbsp;like&nbsp;this.  
  
  
  
At&nbsp;first&nbsp;I&nbsp;have&nbsp;4&nbsp;shapefile,&nbsp;I&nbsp;load&nbsp;each&nbsp;file&nbsp;using&nbsp;separate&nbsp;layers,&nbsp;and&nbsp;add&nbsp;it&nbsp;into&nbsp;1&nbsp;serveroverlay&nbsp;that&nbsp;I’ve&nbsp;created&nbsp;before.  
  
  
  
Now&nbsp;I&nbsp;want&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;control&nbsp;what&nbsp;layer&nbsp;can&nbsp;be&nbsp;seen&nbsp;in&nbsp;my&nbsp;silverlight&nbsp;apps,&nbsp;so&nbsp;I&nbsp;change&nbsp;how&nbsp;I&nbsp;load&nbsp;those&nbsp;shapefile.&nbsp;I&nbsp;load&nbsp;each&nbsp;shapefile&nbsp;and&nbsp;add&nbsp;it&nbsp;into&nbsp;separate&nbsp;overlay.  
  
because&nbsp;now&nbsp;I&nbsp;have&nbsp;separate&nbsp;overlay,&nbsp;I&nbsp;can&nbsp;easily&nbsp;remove&nbsp;and&nbsp;add&nbsp;ServerOverlay&nbsp;in&nbsp;my&nbsp;Silverlight&nbsp;Apps&nbsp;so&nbsp;that&nbsp;I&nbsp;can&nbsp;only&nbsp;see&nbsp;what&nbsp;layer(s)&nbsp;I&nbsp;want&nbsp;to&nbsp;see.  
  
And&nbsp;don’t&nbsp;forget&nbsp;on&nbsp;top&nbsp;of&nbsp;that,&nbsp;I&nbsp;also&nbsp;add&nbsp;Google&nbsp;overlay&nbsp;via&nbsp;ServerOverlay&nbsp;too&nbsp;as&nbsp;base&nbsp;Overlay&nbsp;and&nbsp;I&nbsp;also&nbsp;can&nbsp;hide&nbsp;and&nbsp;show&nbsp;this&nbsp;overlay.  
  
  
  
Hope&nbsp;that&nbsp;can&nbsp;help&nbsp;you&nbsp;reproduce&nbsp;the&nbsp;same&nbsp;effect.

---

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 25, 2014, 6:29am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/6 "2014-08-25T06:29:07Z")

</div>

Ooh,&nbsp;and&nbsp;one&nbsp;more&nbsp;thing.  
  
does&nbsp;it&nbsp;has&nbsp;anything&nbsp;to&nbsp;do&nbsp;with&nbsp;changing&nbsp;ServerOverlay&nbsp;(adding&nbsp;or&nbsp;removing)&nbsp;while&nbsp;MapSuite&nbsp;Smartmap&nbsp;controls&nbsp;loads&nbsp;the&nbsp;tile?

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [August 26, 2014, 5:11am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/7 "2014-08-26T05:11:04Z")

</div>

Hi&nbsp;Syarief,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;will&nbsp;try&nbsp;to&nbsp;reproduced&nbsp;that&nbsp;follow&nbsp;your&nbsp;steps.&nbsp;  
&nbsp;&nbsp;  
&nbsp;For&nbsp;your&nbsp;question,&nbsp;do&nbsp;you&nbsp;meant&nbsp;you&nbsp;want&nbsp;to&nbsp;add&nbsp;or&nbsp;remove&nbsp;ServerOverlay&nbsp;when&nbsp;the&nbsp;map&nbsp;is&nbsp;loading?&nbsp;Just&nbsp;like&nbsp;what&nbsp;JavaScript&nbsp;works&nbsp;for&nbsp;Web&nbsp;page?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Don

---

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 26, 2014, 11:38pm UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/8 "2014-08-26T23:38:06Z")

</div>

Hi&nbsp;Don,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;just&nbsp;want&nbsp;to&nbsp;be&nbsp;able&nbsp;remove&nbsp;or&nbsp;adding&nbsp;ServerOverlay&nbsp;without&nbsp;paying&nbsp;attention&nbsp;wether&nbsp;Map&nbsp;has&nbsp;loaded&nbsp;the&nbsp;tiles&nbsp;or&nbsp;not,&nbsp;so&nbsp;basically&nbsp;the&nbsp;answer&nbsp;is&nbsp;yes.

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [August 27, 2014, 9:25pm UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/9 "2014-08-27T21:25:40Z")

</div>

Hi&nbsp;Syarief,  
  
  
  
Thanks&nbsp;for&nbsp;your&nbsp;detailed&nbsp;description&nbsp;of&nbsp;the&nbsp;issue,&nbsp;there&nbsp;are&nbsp;2&nbsp;reasons&nbsp;why&nbsp;that&nbsp;error&nbsp;occurs&nbsp;in&nbsp;your&nbsp;application,&nbsp;just&nbsp;shown&nbsp;as&nbsp;below:  
  
1.&nbsp;The&nbsp;OverlayId&nbsp;should&nbsp;be&nbsp;same&nbsp;to&nbsp;the&nbsp;one&nbsp;you&nbsp;specified&nbsp;in&nbsp;the&nbsp;Asp.NET&nbsp;application,&nbsp;when&nbsp;you&nbsp;create&nbsp;the&nbsp;ServerLayerOverlay&nbsp;on&nbsp;server&nbsp;side,&nbsp;for&nbsp;example,&nbsp;if&nbsp;the&nbsp;code&nbsp;in&nbsp;Asp.NET&nbsp;is:

> `GoogleMapsLayer googleStatelliteLayer = ``new`&nbsp;`GoogleMapsLayer();`  
> `googleStatelliteLayer.MapType = GoogleMapsMapType.Satellite;`  
> `ServerLayerOverlay layerWithGoogelSatelliteMapOverlay = ``new`&nbsp;`ServerLayerOverlay(``"NativeServerWithGoogleSatelliteMap"``);`  
> `layerWithGoogelSatelliteMapOverlay.Layers.Add(googleStatelliteLayer);`  
> `SilverlightMapConnector1.ServerLayerOverlays.Add(layerWithGoogelSatelliteMapOverlay);`

  
  
  
the&nbsp;client&nbsp;in&nbsp;Silverlight&nbsp;should&nbsp;use&nbsp;the&nbsp;ID&nbsp;"NativeServerWithGoogleSatelliteMap"&nbsp;to&nbsp;create&nbsp;the&nbsp;ServerLayerOverlay,&nbsp;just&nbsp;shown&nbsp;as&nbsp;following:  
  

> `ServerLayerOverlay overlay4 = new ServerLayerOverlay("NativeServerWithGoogleSatelliteMap", "SilverlightMapConnector1");`

  
2.&nbsp;Please&nbsp;make&nbsp;sure&nbsp;the&nbsp;ConnectorId&nbsp;is&nbsp;not&nbsp;empty,&nbsp;because&nbsp;this&nbsp;is&nbsp;a&nbsp;very&nbsp;important&nbsp;parameter&nbsp;to&nbsp;fetch&nbsp;the&nbsp;configurations&nbsp;from&nbsp;storage&nbsp;on&nbsp;server&nbsp;side.&nbsp;If&nbsp;it’s&nbsp;empty,&nbsp;it&nbsp;will&nbsp;give&nbsp;the&nbsp;exception&nbsp;shown&nbsp;in&nbsp;your&nbsp;attached&nbsp;image.  
  
  
  
  
  
Sorry&nbsp;for&nbsp;the&nbsp;inconvenience,&nbsp;I&nbsp;guess&nbsp;we&nbsp;shouldn’t&nbsp;public&nbsp;the&nbsp;constructor&nbsp;of&nbsp;ServerLayerOverlay&nbsp;without&nbsp;parameter&nbsp;in&nbsp;SilverlgitEdition.dll,&nbsp;we&nbsp;will&nbsp;do&nbsp;the&nbsp;enhancements&nbsp;in&nbsp;next&nbsp;release.  
  
  
  
Thanks,  
  
Johnny  
  
  
  
  
  
&nbsp;&nbsp;&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 28, 2014, 2:16am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/10 "2014-08-28T02:16:46Z")

</div>

Hi&nbsp;Johnny,  
  
  
  
Thanks&nbsp;you&nbsp;so&nbsp;much&nbsp;you&nbsp;saved&nbsp;my&nbsp;time,&nbsp;that&nbsp;was&nbsp;actually&nbsp;the&nbsp;culprit&nbsp;that&nbsp;causing&nbsp;error.  
  
  
  
Thanks.

---

<div class="post-metadata">

**Author:** ![Syarief](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@Syarief](https://community.thinkgeo.com/u/Syarief)\
**Post date:** [August 28, 2014, 2:23am UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/11 "2014-08-28T02:23:08Z")

</div>

Hi&nbsp;Johnny,  
  
  
  
I&nbsp;just&nbsp;want&nbsp;to&nbsp;add&nbsp;my&nbsp;opinion&nbsp;about&nbsp;this&nbsp;problem,&nbsp;why&nbsp;doesn’t&nbsp;MapSuite&nbsp;service&nbsp;just&nbsp;ignore&nbsp;the&nbsp;request&nbsp;(instead&nbsp;of&nbsp;throwing&nbsp;error)&nbsp;when&nbsp;it&nbsp;couldn’t&nbsp;find&nbsp;the&nbsp;overlay&nbsp;based&nbsp;on&nbsp;id&nbsp;parameter.&nbsp;Because&nbsp;in&nbsp;the&nbsp;end,&nbsp;the&nbsp;silverlight&nbsp;client&nbsp;doesn’t&nbsp;even&nbsp;know&nbsp;what&nbsp;has&nbsp;happened&nbsp;or&nbsp;wrong.  
  
  
  
Thanks.

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [August 28, 2014, 10:33pm UTC](https://community.thinkgeo.com/t/smartmap-service-error-while-getting-tiles/7040/12 "2014-08-28T22:33:00Z")

</div>

Hi&nbsp;Syarief,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you&nbsp;very&nbsp;much&nbsp;for&nbsp;your&nbsp;suggestion,&nbsp;I&nbsp;was&nbsp;thinking&nbsp;maybe&nbsp;we&nbsp;can&nbsp;add&nbsp;a&nbsp;ExceptionMode&nbsp;property&nbsp;to&nbsp;the&nbsp;Map&nbsp;object,&nbsp;and&nbsp;make&nbsp;it&nbsp;as&nbsp;"DrawException"&nbsp;by&nbsp;default&nbsp;to&nbsp;avoid&nbsp;app&nbsp;crash.&nbsp;I&nbsp;have&nbsp;entered&nbsp;this&nbsp;requirement&nbsp;to&nbsp;our&nbsp;issue&nbsp;tracking&nbsp;system.&nbsp;Hope&nbsp;it&nbsp;can&nbsp;be&nbsp;available&nbsp;in&nbsp;the&nbsp;daily&nbsp;builds&nbsp;soon.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;Johnny
