2

I have a feature class in ArcCatalog. I need to save the feature class to a Map and then publish the map to the Arcserver. All programatically and hopefully in C#. I can't seem to find any examples at ESRI or by googling. Any help and examples of this would be absolutely amazing. But just leading me down the right path is cool too.

3

It will probably be simpler to use Python to script through the actions you want to take, but here's some relevant .NET code that can publish an MXD to ArcGIS Server (when run by a user who is a member of agsadmin):

AGSSOM
AGSSOM.exe is a sample command line utility for starting, stopping, and restarting ArcGIS Server services.

You'll be most interested in the code that does the PUBLISH command.

1

I posted the answer to my blog before I realized this should be answered first.

http://spoiledtechie.com/post/2010/08/04/How-to-publish-a-ArcMap-to-the-ArcGIS-Servere280a6.aspx

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.