Select to view content in your preferred language

In 10.2 type 'ESRI.ArcGIS.ADF.xyz' not defined

4630
5
03-30-2016 10:39 AM
JoseSanchez
Frequent Contributor

Hello everyone,

 

When I open a Vb.Net console application that worked fine in 10.0 in 10.2 I get the following error messages:

 

Type 'ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection' is not defined.
Type 'ESRI.ArcGIS.ADF.Identity' is not defined.

Type 'ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection' is not defined.

 

 

Thanks

0 Kudos
5 Replies
HernandezAstorga
Deactivated User

Hi everyone!!

I have a little big problem , I have  a file "File CPG (.cpg)",I try to open this in my ARCGIS10 but not let me "Invalid raster dataset. Failed to create raster layer". Any suggestions for open this file? My email is fhas33@gmail.com

Thank you 

0 Kudos
nicogis
MVP Frequent Contributor

in ArcGIS 10.1 or superior, local DCOM connections to arcgis server are not supported.

if you need connect ags 10.0 you add assembly

Now ags 10.1 or superior is pure http/https for connection.

for administrator you can use rest api admin: http://resources.arcgis.com/en/help/server-admin-api/

see also http://resources.arcgis.com/en/help/main/10.1/0154/0154000005p3000000.htm

if you need pure arcobjects (server side) you can develop soe (soap/rest):

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/What_is_a_server_object_extensio...

migrate soe previous 10.0 to 10.1

http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/0001/000100000p4s000000.htm

if you need add/edit/delete feature you can use feature service.

What do you need do?

0 Kudos
JoseSanchez
Frequent Contributor

Hi Domenico! How are you?

This is what my .Net web servicedoes. It geocodes an incident.

An external application calls one method and passes an incident number and an address, with this information the method
creates a point at the specific address in a point layer.

What I need to  run in 10.1:

  • a way to connect to the server
  • a way to retrieve the first and only layer from the map
         service
  • a way to write a new feature

Old code to connect to server:

Connect to ArcGIS Server

' Connect to ArcGIS
Server



Dim adfIdentity As New
ESRI.ArcGIS.ADF.Identity(username, password, domain)



agsServerConnection =
New ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection(hostname, adfIdentity)



  1. agsServerConnection.Connect()

Old code to retrieve map service and
first layer:

' Get a reference to the
server object manager to use in creating server objects



Dim
serverObjectManager As ESRI.ArcGIS.Server.IServerObjectManager =
agsServerConnection.ServerObjectManager

' Create a server
context for and get a reference to the BloomfieldTownship map service.  We
will



' use this to access map
information and query features.



"MapServer")

Dim
mapServer As ESRI.ArcGIS.Carto.IMapServer2 = TryCast(mapServerContext.ServerObject,
ESRI.ArcGIS.Carto.IMapServer2)

' Get a reference to the
map service's server objects



Dim
mapServerObjects As ESRI.ArcGIS.Carto.IMapServerObjects = CType(mapServer,
ESRI.ArcGIS.Carto.IMapServerObjects)

Dim
map As ESRI.ArcGIS.Carto.IMap =
mapServerObjects.Map(mapServer.DefaultMapName)

Dim
pFLayer As ESRI.ArcGIS.Carto.IFeatureLayer = map.Layer(0)

Dim
pFeatureClass As IFeatureClass
= pFLayer.FeatureClass

Code to write a new feature

Dim feature As IFeature = pFeatureClass.CreateFeature()

feature.Shape = pPoint

feature.Value(feature.Fields.FindField("ID")) = IncidentID

feature.Value(feature.Fields.FindField("ADDRESS")) = Address

feature.Value(feature.Fields.FindField("XCOORD")) =
pPoint.X

feature.Value(feature.Fields.FindField("YCOORD")) = pPoint.Y

feature.Value(feature.Fields.FindField("PROBDESC")) = ProblemDescription

feature.Store()

0 Kudos
nicogis
MVP Frequent Contributor

Hi Jose!

you can create a map service with capability feature service ( Editor permissions for feature services—Documentation (10.3 and 10.3.1) | ArcGIS for Server ) and use add feature via rest ArcGIS REST API using vb.net or you can create a soe / gp and call it using vb.net

JoseSanchez
Frequent Contributor

Excellent idea using a feature service!

0 Kudos