1

This is the second time that I have posted about this. In my previous question they told me I needed to enable the Feature Access capability. I did this and then it said I needed to have a Data Store with type SDE. After fighting with this for a week, I finally got the service to publish with these capabilities... and guess what... it still does not work. Below is my code and a series of screen shots. Any help is appreciated.

XAML (Revelant):

 <esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True"  MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352" Loaded="MyMap_Loaded">
                <esri:Map.Layers>
                    <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
                    <esri:FeatureLayer ID="WaterValves" 
                                       Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_Server/MapServer/0" 
                                       Renderer="{StaticResource MySimpleRenderer}"
                                       OutFields="*" 
                                       MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp" 
                                       MouseLeftButtonDown="FeatureLayer_MouseLeftButtonDown_1" 
                                       DisableClientCaching="True"
                                       OnDemandCacheSize="0"
                                       Mode="OnDemand"
                                       AutoSave="False"/>
                    <esri:GraphicsLayer ID="CandidateGraphicsLayer">
                        <esri:GraphicsLayer.MapTip>
                            <Grid>
                                <Rectangle Stroke="Gray"  RadiusX="10" RadiusY="10" Fill="#77FF0000" Margin="0,0,0,5" >
                                    <Rectangle.Effect>
                                        <DropShadowEffect/>
                                    </Rectangle.Effect>
                                </Rectangle>
                                <Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" />
                                <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="30,20,30,30">
                                    <TextBlock Text="{Binding [Address]}" HorizontalAlignment="Left" Foreground="Black" />
                                </StackPanel>
                            </Grid>
                        </esri:GraphicsLayer.MapTip>
                    </esri:GraphicsLayer>
                    <esri:ArcGISDynamicMapServiceLayer ID="CalvertCity" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_Server/MapServer" />
                </esri:Map.Layers>                
            </esri:Map>

            <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch"/>
            <esri:FeatureDataGrid Grid.Row="2" x:Name="MyDataGrid"/>

<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,15,15,0" x:Name="USS_Data" Height="600" Width="298" Visibility="Hidden">
                <Rectangle Fill="{StaticResource PanelGradient}"  Stroke="Gray" RadiusX="10" RadiusY="10" Margin="0,0,0,39">
                    <Rectangle.Effect>
                        <DropShadowEffect />
                    </Rectangle.Effect>
                </Rectangle>
                <Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,48" Height="Auto" />
                <DockPanel HorizontalAlignment="Stretch"  Margin="30,20,30,30">
                    <telerik:RadGridView Height="240" DockPanel.Dock="Top" Foreground="Black">

                    </telerik:RadGridView>
                     <esri:FeatureDataForm x:Name="MyFeatureDataForm" Height="240" Foreground="Black" DockPanel.Dock="Bottom"
                                         IsReadOnly="False" LabelPosition="Left" />
                </DockPanel>
            </Grid>

Let me know if some necessary parts of my XAML are missing.

C#(Relevant):

private void FeatureLayer_MouseLeftButtonUp(object sender, GraphicMouseButtonEventArgs e)
        {
            FeatureLayer flayer = sender as FeatureLayer;

            MapPoint clickpoint = MyMap.ScreenToMap(e.GetPosition(MyMap));

            if (clickpoint != lastPoint)
            {
                MyInfoWindow.Anchor = clickpoint;
                MyInfoWindow.Content = e.Graphic.Attributes;
                MyInfoWindow.IsOpen = true;
                lastPoint = clickpoint;
            }



            FeatureLayer featureLayer = sender as FeatureLayer;

            for (int i = 0; i < featureLayer.SelectionCount; i++)
                featureLayer.SelectedGraphics.ToList()[i].UnSelect();

            e.Graphic.Select();
            MyFeatureDataForm.GraphicSource = e.Graphic;

           // FeatureDataFormBorder.Visibility = Visibility.Visible;
            USS_Data.Visibility = Visibility.Visible;
            PortalGrid.Visibility = Visibility.Hidden;



        }

        private void MyInfoWindow_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            MyInfoWindow.IsOpen = false;
            //FeatureDataFormBorder.Visibility = Visibility.Hidden;
            USS_Data.Visibility = Visibility.Hidden;
            PortalGrid.Visibility = Visibility.Visible;
        }

        private void MyDataGrid_Initialized(object sender, EventArgs e)
        {
            MyDataGrid.GraphicsLayer = MyMap.Layers[1] as GraphicsLayer;
        }

        private void MyMap_Loaded(object sender, RoutedEventArgs e)
        {
            MyDataGrid.Map = MyMap;
            MyDataGrid.GraphicsLayer = MyMap.Layers[1] as ESRI.ArcGIS.Client.GraphicsLayer;
            MyFeatureDataForm.FeatureLayer = MyMap.Layers[1] as ESRI.ArcGIS.Client.FeatureLayer;
        }


        private void FeatureLayer_MouseLeftButtonDown_1(object sender, GraphicMouseButtonEventArgs e)
        {
            e.Graphic.Selected = !e.Graphic.Selected;
            if (e.Graphic.Selected)
                MyDataGrid.ScrollIntoView(e.Graphic, null);
        }
    }

Again, let me know if there is something that I need to include.

Pictures!

I will start with pictures of my settings in ArcGIS for Server:

This shows that my service is running: running

This shows the capabilities: capabilities

This shows the data store: data store

Now for what it looks like to the user...

The legend with the database data: Legend

The map showing the points and labels:

Map_Data

The Grid which will never let me commit or remove a selection:

grid

And the Dataform which does not have the save button like I have seen others have:

featureform

Warnings when Analyzing map before publishing:

errors

Any help will be greatly appreciated. I am at a point where I don't know where else to go.

3
  • are you getting any errors?
    – Craig
    Commented Apr 25, 2013 at 15:38
  • The only thing that I am getting is when I analyze my map before I publish it, I get a few warnings. I will post a picture of the warnings
    – JLott
    Commented Apr 25, 2013 at 15:43
  • Warnings: 1.) Layer's data source has a different projection that the data frame's projection. 2.) Data source is not registered with the server and the data will be copied to the server. 3.) Layer does not have a feature template set. 4.) Map is being published with data copied to the server using data frame full extent.
    – JLott
    Commented Apr 25, 2013 at 15:46

1 Answer 1

1

A few things that might help:

1) according to Analyze error 2

2.) Data source is not registered with the server and the data will be copied to the server.

One of your SDE databases is still not properly registered in the Data Store. One thing that caught me was that when you're setting up a Data Store, you specify a SDE connection file. The username/password in that connection file is ignored, and the credentials of the Server admin account are used instead. Although earlier in the thread, it looks like you have successful registered the connection in the Data Store already, but the Analyze never lies :)

2) Another thing to keep an eye on is that I see you are using localhost. I've had problems with this in the past where some things seem to work, while others fail. You might want to set that back to the full server name.

3) Related to 1, make sure your AGS account has permissions on the database.

You could also whip together a very quick site using the ArcGIS Viewer App for Silverlight. This would at least take your code out of the equation.

I hope that's of some use.

Good luck

4
  • As I understand it, when you add an enterprise geodatabase to the data store, it uses the data directly. If you don't, it will replicate the data into file geodatabase. The reason that you must use an enterprise geodatabase for feature level access is that a file geodatabase maintains a lock on features. If the case is that your enterprise geodatabase is not properly in the Data Store, the service will be using the geodatabase, which would explain it's behaviour. Just fyi... Commented May 1, 2013 at 21:41
  • How would I properly get the enterprise geodatabase into the datastore? I can edit the features in ArcMap, but then I cannot in the actual application.
    – JLott
    Commented May 7, 2013 at 13:19
  • The first thing to check is to make sure the ArcGIS Server account (the active directory account that owns the ArcGIS Server process) has permissions to SDE. Then create a connection to the enterprise gdb, and note the name. Once that's done, start ArcGIS Manager > Click on Site > Click on Data Stores (in the left menu), then click Register Database. Add any Name you want, then browse to the connection file by clicking the Import button. Once it's added, click the Validate All button. Remember, the password in the connection file is ignored, and the AGS Server password is used instead. Commented May 7, 2013 at 15:43
  • It seems to be there and I can pull the data by doing a Query on the ArcGIS Server.. I really don't understand why it is not even letting me type in the FeatureDataGrid and there is absolutely nothing I can find on it through Google.
    – JLott
    Commented May 7, 2013 at 18:21

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.