public static void SetFeatureAccessOnMapService(string serverMachineName, string serviceName) { IAoInitialize aoInit = new AoInitializeClass(); aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer); IGISServerConnection2 pGISServerConnection = new GISServerConnectionClass(); pGISServerConnection.Connect(serverMachineName); IServerObjectAdmin pServerObjectAdmin = pGISServerConnection.ServerObjectAdmin; IServerObjectConfiguration4 pConfiguration4 = (IServerObjectConfiguration4)pServerObjectAdmin.GetConfiguration(serviceName, "MapServer"); pConfiguration4.set_ExtensionEnabled("FeatureServer", true); IPropertySet info = pConfiguration4.get_ExtensionInfo("FeatureServer"); info.SetProperty("WebEnabled", "true"); info.SetProperty("WebCapabilities", "Query,Editing"); pServerObjectAdmin.UpdateConfiguration(pConfiguration4); pServerObjectAdmin.StartConfiguration(serviceName, "MapServer"); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.