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.
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.
I posted the answer to my blog before I realized this should be answered first.
I hope this helps.