I have a simple AGS map service. I accidentally specified an invalid SRID explicitly in my Silverlight XAML:

<esri:Map x:Name="Map" IsLogoVisible="False">
        <esri:Envelope XMin="526801.81" YMin="489775.0655" XMax="593105.41" YMax="523904.2045">
                <esri:SpatialReference WKID="3807" />
        <esri:ArcGISDynamicMapServiceLayer x:Name="MyLayer" ID="MyService" Url="http://localhost/ArcGIS/rest/services/MyService/MapServer" Initialized="MyLayer_Initialized" InitializationFailed="Layer_InitializationFailed" />

This results in a RESTful request that looks like this:


This request fails with the following IIS error:

Error Summary

HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.

Detailed Error Information

Module  ESRI.RestModule-Integrated
Notification    ResolveRequestCache
Handler StaticFile
Error Code  0x00000000

If I replace the invalid SRID, everything works fine.

Is there any way to get the Silverlight API to report exceptions like this? As it is I have to use Fiddler to find it.

enter image description here

  • what spatial reference does 3807 refer to? Commented Mar 2, 2011 at 18:16
  • spatialreference.org/ref/epsg/3087
    – nw1
    Commented Mar 2, 2011 at 18:33
  • Typo? 3807 isn't a valid SRID. Do you still have this problem when using 3087? Commented Mar 2, 2011 at 20:21
  • 1
    -1 For this question to be useful, I think it should be reframed around how to catch a 500 error in Silverlight. I searched a bit but don't see an easy way. Commented Mar 3, 2011 at 14:40

1 Answer 1


It doesn't look like Esri supports this spatial ref:

Update: this seems to work:


I'm also interested in ways to trap a 500 error in silverlight.

Update: If we were working with WCF directly, it appears that Microsoft provides a way to catch this. However, since it is Esri's Map control making the calls, it seems like they would need to catch it. I don't see something for this in the Map control's list of events. Maybe the Map needs to expose something similar to Layer.InitializationFailed, that would let us catch these types of http errors without relying on Fiddler.

  • What do you mean when you say they don't "support" it? It's a perfectly valid SR.
    – nw1
    Commented Mar 2, 2011 at 19:55
  • I think OP has a typo in the original post. It's 3087, not 3807. This works: sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/…{%22geometryType%22:%22esriGeometryPoint%22,%22geometries%22:[{%22x%22:-82,%22y%22:22}]} Commented Mar 2, 2011 at 20:18
  • 2
    @Swingley Doh! You're totally right. But seriously ESRI... how on earth is 500 Internal Server Error the right response to an invalid SRID?
    – nw1
    Commented Mar 2, 2011 at 20:24
  • 1
    Don't check this answer if it doesn't really answer your question. Someone from Esri might be more inclined to reply to an unanswered question. Commented Mar 3, 2011 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.