ConvertToMSD and PublishToMSDServer

206
6
12-12-2010 09:59 AM
LanceCrumbliss
Occasional Contributor II
are there ArcObjects equivalents to the two above ArcPy functions?  if not, will there be?  it would seem to be an odd decision on ESRI's part if indeed there are not.  i can dynamically create a python script, but not successfully execute it using process.start or shell because it runs on the server from a web request using the NET SERVICE permissions.  trying to execute the script with those permissions fails. i've even enabled impersonation, using an account with appropriate rights.  all works fine on the dev server, but publishing the application to IIS is when the issues start.  having ArcObject functions would go a long way towards fixing the issue.
0 Kudos
6 Replies
LanceCrumbliss
Occasional Contributor II
sorry, the title of this thread should read "ConvertToMSD and PublishMSDToServer"

further...in addition to the usual service capabilities ("MAPPING", "KML", "WCS", "WFS", "WMS", etc) how does one add "Feature Access" capabilities to the service via either ArcPy or [ideally] ArcObjects to allow editing of features via the Web APIs?
0 Kudos
GregoryKramida
New Contributor
I ran into exactly the same problem 9 moths after chuckyboy.
How do I add the "Feature Access" capability using ArcPy or ArcObjects?
0 Kudos
GregoryKramida
New Contributor
It's been 20 days now - still no answer? Anybody?
0 Kudos
GeorgeVernardos
New Contributor III
I've been having the same issue for quite a while now, just figured out a way to do it. It's ArcObjects (now I believe one can do anything with them...), apparently arcpy.mapping is not yet updated to support enabling Feature Access in PublishMSDToServer.

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");
}


It was this thread that put me on the right track: http://forums.arcgis.com/threads/23196-Publish-MXD-to-server-in-ArcObjects-C
0 Kudos
GregoryKramida
New Contributor
Thank you, that helps a lot.
0 Kudos
JackZHANG
Occasional Contributor II
Is there a way now to add the Feature Access ability through ArcPy now?
0 Kudos