You are here: > ESRI Forums > arcgis engine forums > Thread Replies

ArcGIS Engine Forums

ArcGIS Engine: Developer Kit forum

adding group layer in arcgis server   ferah ferah Jun 01, 2009
Re: adding group layer in arcgis server   Frederic Squires Jun 26, 2009
Re: adding group layer in arcgis server   Robert MEIER Jan 18, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject adding group layer in arcgis server 
Author ferah ferah 
Date Jun 01, 2009 
Message Dim connectionFactory As ESRI.ArcGIS.GISClient.IAGSServerConnectionFactory
connectionFactory = New ESRI.ArcGIS.GISClient.AGSServerConnectionFactoryow
Dim connectionProps As IPropertySet
connectionProps = New PropertySet
connectionProps.SetProperty("URL", "http://cmaps.gov.tr/maps/services")
Dim gisServer As ESRI.ArcGIS.GISClient.IAGSServerConnection
gisServer = connectionFactory.Open(connectionProps, 0)
'//get an enum of all server object names from the server (GIS services, i.e.)
Dim soNames As ESRI.ArcGIS.GISClient.IAGSEnumServerObjectName = gisServer.ServerObjectNames
Dim soName As ESRI.ArcGIS.GISClient.IAGSServerObjectName
' //loop thru all services, find a map service called "I3_Imagery_Prime_World_2D" (high res imagery for the world)
'Dim pEnumSOName As IAGSEnumServerObjectName
soName = soNames.Next()
Do Until soName Is Nothing
' MessageBox.Show(soName.Name)
If soName.Name = "ALTYAPI" Then Exit Do
soName = soNames.Next()
Loop
If Not soName Is Nothing Then
Dim msLayerFactory As ILayerFactory
msLayerFactory = New MapServerLayerFactory
If msLayerFactory.CanCreate(soName) = True Then
Dim enumLyrs As IEnumLayer = msLayerFactory.Create(soName)
'MESSAGEOX.SHOW(msLayerFactory.PublicName())
Dim mapServerLayer As IMapServerLayer
mapServerLayer = CType(enumLyrs.Next, IMapServerLayer)
If Not mapServerLayer Is Nothing Then
axMapControl1.AddLayer(CType(mapServerLayer, ILayer))
End If
End If




I have an appplication in arcgis engine.
How can I add group layer in arcgis server to my application as a layer?
In my code when I run the program the error "Could not connect to the Map Server" is given and shows the line below;
Dim enumLyrs As IEnumLayer = msLayerFactory.Create(soName)
I am waiting for your solutions...

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: adding group layer in arcgis server 
Author Frederic Squires 
Date Jun 26, 2009 
Message I do not have a solution for you. I am experiencing the same error when I'm adding a map service from arcgis server to arcmap. i never had this problem before. a more detailed error message would be helpful. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: adding group layer in arcgis server 
Author Robert MEIER 
Date Jan 18, 2010 
Message I am having the same error, CanCreate returns true, but then Create causes and error.

I have this code in a Web Service, this runs fine on my local machine, but when I run it on the server I get the error.

Any solution on this yet??