Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

All,

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.

Thanks guys!

share|improve this question

2 Answers 2

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.

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.

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

I hope this helps.

share|improve this answer

Your Answer

 
discard

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.