Duplicate IDs are not allowed
I have a site in Geocortex Essentials 3.1 that where I am trying to add a local ArcGIS Server service.. arcserver/rest/services/test/maxout/MapServer.. the service has 1300+ layers in it.. I was wondering if there is a limit on the number of layers that can be added to a Essentials Rest Site..and or does Essentials not like ArcGIS service layers with the same name? Server Error in '/Geocortex/Essentials/REST' Application. An item with the ID "25" already exists in the collection. Duplicate IDs are not allowed. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NotSupportedException: An item with the ID "25" already exists in the collection. Duplicate IDs are not allowed. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NotSupportedException: An item with the ID "25" already exists in the collection. Duplicate IDs are not allowed.] Geocortex.Essentials.IdentifiableResourceCollection`1.ValidateItem(T item) +201 Geocortex.Essentials.IdentifiableResourceCollection`1.InsertItem(Int32 index, T item) +22 Geocortex.Essentials.Configuration.Models.MapServiceConfig.ConfigureMapService(MapService mapService, Site site) +1502 Geocortex.Essentials.Configuration.Models.MapServiceConfig.ToBusinessObject(Site site) +38 Geocortex.Essentials.Configuration.Models.MapBaseConfig.ConfigureMap(MapBase map, Site site) +159 Geocortex.Essentials.Configuration.Models.MapConfig.ConfigureMap(MapBase map, Site site) +24 Geocortex.Essentials.Configuration.Models.SiteConfig.ConfigureSite(Site site) +1810 Geocortex.Essentials.Configuration.Models.SiteConfig.ToBusinessObject() +37 Geocortex.Essentials.Rest.EssentialsRestController.CreateSite(String siteID) +97 Geocortex.Essentials.Rest.EssentialsRestController.GetSite(String siteID) +112 Geocortex.Essentials.Rest.EssentialsRestRequestDispatcher.GetSite() +32 Geocortex.Essentials.Rest.EssentialsRestRequestDispatcher.ProcessRequestUnderContext() +117 Geocortex.ApplicationServices.Security.Enforcement.Authorization.ExecuteInNewContext(Action action) +146 Geocortex.Essentials.Rest.EssentialsRestRequestDispatcher.ProcessRequest() +53 Geocortex.Rest.Handling.RestController.TryHandleRequest(RequestContext context, RestResourceInfo info) +1369 Geocortex.Rest.Handling.b.b() +165 Geocortex.Rest.Handling.b.a(HttpContext A_0) +16 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
0
-
Is "25" the name of two or more layers belonging your site? The error message seems to indicate that there is a conflict with an existing ID, and not a conflict with a layer name but I want to be sure. 0 -
I also encountered that same problem. I thought it was because I had two "Roads" layers in my msd. I removed one of the layers and attempted to add the msd to my site and it worked. One "Roads" layer was a selection of features from the original "Roads" layer. My guess is the REST manager does not like having two layers with the same name originating from the same root feature class. I am curious to know if just changing the name of one the layers would work or would I have to create a new feature class. 0 -
REST Manager currently doesn't work with map services which have layers with duplicate names. It doesn't matter which feature class they layers are generated from. The reason for this restriction is that REST Manager references layers by their names, not their IDs (which are unique). This is in response to issues that can arise when referencing layers by their IDs... specifically, if you reference the layers by their IDs, and then add a new layer to the map service, all layers underneath that layer will be assigned new IDs causing broken references. This is a huge maintenance problem. I think we've chosen the "best of two evils". I should also mention that we are currently working on providing a better solution to the duplicate names problem. When adding a map service, if REST Manager detects a duplicate layer it will display a message to the user and continue, skipping the duplicate layer. I hope this provides further clarity to the issue you seem to be encountering. Drew. 0
Please sign in to leave a comment.
Comments
3 comments