Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.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.

share|improve this answer
up vote 1 down vote accepted

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

I hope this helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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