Select to view content in your preferred language

Editing with Silverlight

1145
6
05-20-2010 11:29 AM
DougCollins
Regular Contributor
Greetings,
I have been trying to get the editing example to work using the new ESRI SL 2.0 beta API, but I am having problems with the Feature Layer loading.  I have ArcGIS Server Enterprise 10 pre-release on one machine and ArcSDE 9.3.1 with MS SQL server 2008 on another machine.   I have created a Feature Service with point, line, and polygon feature classes defined in an mxd.  The Silverlight display comes up and loads a background layer, but the feature layer fails to initialize.  In visual studio, I set a breakpoint at the FeatureLayer_InitializationFailed method and it looks like one of the properties "isReadOnly" is set to "true".  I am guessing that my problem might be permissions between the SOC on the ArcGIS server machine and the ArcSDE, but I am not sure.  I have tried Granting edit permission to the SOC on the feature classes in SDE through ArcCatalog, but that seems to fail.  Am I on the right track here, or am I not seeing the light?

Thanks in advance for any help!
Charlie
0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor
The ReadOnly property will only flip to true if the service successfully initializes.
Take a look at this blogpost: http://blogs.esri.com/Dev/blogs/silverlightwpf/archive/2009/08/24/Troubleshooting-blank-layers.aspx
It might give you some hints as to why your service is not initializing. Also it would help if you would share the InitialzationFailure exception.
0 Kudos
DougCollins
Regular Contributor
Thanks for the reply and the really nice blog post!

I went through all the items in your blog post and I am now at the point where my Feature Layer loads into my Silverlight application.  Using Fiddler, I am able to see the response which includes a couple of polygons that I put in using ArcInfo. 

However, all the editing buttons in the Silverlight Application are "greyed out" and I am unable to edit.  To simplify things I am using the same code that is in the "Edit with Explicit Save" sample, but pointing to my Feature service instead.

Is this now a problem with the ArcGISSOC account on the ArcGIS 10 Server machine not being able to talk to the ArcSDE 9.3.1 on the Geodatabase machine?  I'm just guessing here.

Thanks,
Charlie
0 Kudos
dotMorten_esri
Esri Notable Contributor
I'm actually not entirely sure how the server end works, but I know there are certain gotchas for correctly configuring a service to be writable. If you look at the rest endpoint for the layer, do you see any links to edit at the bottom of the HTML page?
0 Kudos
DougCollins
Regular Contributor
Yes, there are a number of supported operations at the bottom of the page including:  Query, Add Features, Update Features, Delete Features, Apply Edits.
When I click on the "Add Features" link it takes me to a page where I can presumably enter a feature and Add it.

Looking more closely at the XAML code in the sample, there is an Int32 for the Button.CommandParameter for the Add Polygon.  Just curious if this value is unique for this edit operation?

Thanks,
Charlie
0 Kudos
DougCollins
Regular Contributor
Although I had a clientaccesspolicy.xml file on our server, I discovered that the permissions were such that it was not being accessed from my development machine.  Using IIS 7 it was not enough to just open the permissions on that file, but we had to specifically add "Everyone" to the ACL for this file.  That solved our problem.

Charlie
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Just a quick answer to one of your previous question :
Looking more closely at the XAML code in the sample, there is an Int32 for the Button.CommandParameter for the Add Polygon. Just curious if this value is unique for this edit operation?

This Int32 is the feature type which is created by the 'Add' command (useful because the template picker is not used).
So I guess you have to adapt this value to your service.

Sorry I have no clue for your latest issues.
0 Kudos