Is it possible to store geometry objects in a database using the ESRI Silverlight API? For this particular case, the client may have SQL Server 2005 installed instead of 2008 and therefore I can not use spatial types.

Any solution would also have to support clients who use ArcGIS Server 9.3, and therefore we would not be able to use the new editing capabilities in ArcGIS 10.


At 9.3/9.3.1 level, it is not possible to directly save features to the database, using the ESRI Silverlight API.

What you could do, is to create a custom .NET Service, which saves the features in your Geodatabase database. you could call this service from your silverlight App. This Custom .NET service could use ArcObjects or the Web ADF to save the spatial data to the geodatabase

  • What about saving it to a standard SQL Server database instead of the GeoDatabase? Can I serialize the Geometry object and then cast it back again later on? – Britt Wescott Aug 3 '10 at 13:40
  • You have mentioned in your question that the client may have SQL Server 2005. I don't think that 2005 supports Spatial types. You could always serialize the Geometries and then store that in SQL 2005. Do note that this SQL database won't be a geodatabase & other clients won't directly see it as a geometry. – Devdatta Tengshe Aug 4 '10 at 0:34
  • That's fine. Are there any examples of serializing the geometries? When they are deserialized, they will still maintain all proper coordinates and spatial references? Thanks! --Seth – Britt Wescott Aug 4 '10 at 5:53

In the end, I used an XmlSerializer object to read and write the geometry data to the database as XML.


You are correct that you can serialize the geometries. They do have data contracts already defined so serialization is pretty straightforward.

Basically, you can roll your own service to handle the geometries and attributes on the server and them implement a custom layer class in the ESRI Silverlight API to then display and interact with your data. We've done similar things to integrate other data sources into an ESRI Silverlight app.


As far as I know, just jumping into Silverlight development with arcgis, if you can upgrade to 10.0, 2008 can also be used...

Don't quote me on it, just trying to think on what I remember hearing...

  • Sorry, I should've added that the solution must work with ArcGIS 9.3 – Britt Wescott Aug 2 '10 at 20:50

Are you asking if its possible to do this without ArcGIS Server in the equation?

I know that if you are using the new SL API via ArcGIS Server 10, you can make use of the Editable Feature Layer and consume ready-to-go Editor Tasks.

An alternative would be to wait for the expected ArcGIS Application for Silverlight

Check the Flex equivalent --> Click on the Edit Widget

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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