How to publish many mxd files in ArcGIS Server 10.1 automatically?
I have about 60 mxd files and I want to publish them automatically. Is there any way to do this?
you can use arcpy for publishing your mxd files.
for listing your mxd files use os.walk :
and then go this way:
1. AnalyzeForMSD() function (info): Analyzes map documents (.mxd) to determine sources for potential suitability and performance issues when converting a map to a map service definition (MSD) file.
2. ConvertToMSD() function (info) : Converts a map to a map service definition (MSD) file.
3. PublishMSDToServer() function (info) : Publishes an existing map service definition (MSD) file to a designated ArcGIS Server.
the last thing is you should do that merge all funcitons for your needs. actually there is a tutorial which can help u here about Use ArcPy Mapping to Publish Map Documents to ArcGIS Server. it is similar to my documentation...
To summarize(image is from link which i give above):
i hope it helps you...
if you want do it in c# you can see in my blog: http://nicogis.blogspot.it/2012/10/ags-101-restful-administrative-api.html
for conversion mxd -> msd you can use python called from c#
Aragon has a great answer, but unfortunately it doesn't work for ArcGIS / ArcServer 10.1.
The new method I just tried is based off of the ArcGIS 10.1 help. You can find the link to the help file here: http://resources.arcgis.com/en/help/main/10.1/index.html#//00s30000006q000000
Here is how I used the code to publish MXDs based on a specified folder:
There might be a simpler way to use this code, but it works for me. Hope this helps.