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"); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.