<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create MSD in 10.2 in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257309#M6595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I ran into this problem as well after upgrading to Arc 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ability to create or otherwise administer services with ArcObjects was effectively lost when the ability to make "local connections" to ArcGIS Server was removed.&amp;nbsp; Like you, I also found that Python was the only option for automating the creation of Map Services, and that the time it takes to do so is considerably longer than with ArcObjects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One quick note regarding &lt;/SPAN&gt;&lt;STRONG&gt;MSDHelper &lt;/STRONG&gt;&lt;SPAN&gt;and its &lt;/SPAN&gt;&lt;STRONG&gt;Open &lt;/STRONG&gt;&lt;SPAN&gt;method: I believe this is intended to open an &lt;/SPAN&gt;&lt;STRONG&gt;existing .msd file&lt;/STRONG&gt;&lt;SPAN&gt;, not a map document (MXD).&amp;nbsp; It is odd that ArcGIS Server is still using MSD files even though the documentation says they've been replaced with SDs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Starting at ArcGIS 10.1 for Server, Map Server Definition (.msd) files have been replaced with Service Definition Draft (.sddraft) and Service Definition (.sd) files. Please use the CreateMapSDDraft function instead.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can treat SD and MSD files as zip-archives and take a peek at the internal structure.&amp;nbsp; I imagine it'd be possible to establish an SD "template" file and use it as a starting point for creating new services.&amp;nbsp; This would save you from the hassle of invoking the time-consuming Python methods for creating SDDRAFT and SD files on the fly, but I'm not sure all the added complexity would be worth it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 16:34:33 GMT</pubDate>
    <dc:creator>ErinBrimhall</dc:creator>
    <dc:date>2014-07-01T16:34:33Z</dc:date>
    <item>
      <title>Create MSD in 10.2</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257307#M6593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Background:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In 10.0, I'm able to create a map service in less than 2 seconds with ArcObjects.NET.&amp;nbsp; My software has clients all over the US that got very used to new map services up within 10 seconds.&amp;nbsp; They are able to receive new analysis layers quickly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With 10.1 and now 10.2, the ability to create a map service has been taken away from ArcObjects.NET (in a matter of speaking).&amp;nbsp; I have to use ArcPy and/or REST API.&amp;nbsp; I'd be fine with that.&amp;nbsp; But it now takes 25-35 seconds to create a map service.&amp;nbsp; 8 seconds of that is the initialization of Python.&amp;nbsp; The rest comes from setting up the SD draft, then to stage SD, then to publish.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I've noticed is that 10.2 still uses MSD files.&amp;nbsp; And the REST API can create a service with the right service description, which needs an MSD file.&amp;nbsp; So if I could create an MSD file from my MXD and make one REST call, that would be considerably faster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But .. the MSDHelper class in ArcObjects doesn't want to work.&amp;nbsp; I can instantiate it.&amp;nbsp; But when I attempt to use the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Open&lt;/SPAN&gt;&lt;SPAN&gt; method, it fails every time.&amp;nbsp; Regardless of license initialization.&amp;nbsp; The error received is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception from HRESULT: 0x80040353&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Carto&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at ESRI.ArcGIS.Carto.MSDHelperClass.Open(String Path)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at ArcGisLab.Program.Main(String[] args) in c:\Projects\Lab\ArcGisLab\Program.cs:line 32&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; at System.Threading.ThreadHelper.ThreadStart()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The MXD file exists and has been published successfully with ArcPy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Question:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is MSDHelper deprecated?&amp;nbsp; If not, how can I use it?&amp;nbsp; Or how can I create an MSD file in ArcObjects.NET?&amp;nbsp; I do NOT want to call Python within .NET.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 23:07:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257307#M6593</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2014-06-27T23:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create MSD in 10.2</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257308#M6594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For every Python script I run that requires arcpy, there is a 4 second initialization.&amp;nbsp; This is what's killing me the most.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can get rid of that 4 * n seconds if I run Python in interactive mode (wrapped in a Process object) and import arcpy and other Python libraries at the start .. then feed script text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's really annoying.&amp;nbsp; But I guess it'll have to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sure wish I could do a lot more with ArcObjects like I could in 10.0...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jun 2014 15:27:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257308#M6594</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2014-06-30T15:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create MSD in 10.2</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257309#M6595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I ran into this problem as well after upgrading to Arc 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ability to create or otherwise administer services with ArcObjects was effectively lost when the ability to make "local connections" to ArcGIS Server was removed.&amp;nbsp; Like you, I also found that Python was the only option for automating the creation of Map Services, and that the time it takes to do so is considerably longer than with ArcObjects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One quick note regarding &lt;/SPAN&gt;&lt;STRONG&gt;MSDHelper &lt;/STRONG&gt;&lt;SPAN&gt;and its &lt;/SPAN&gt;&lt;STRONG&gt;Open &lt;/STRONG&gt;&lt;SPAN&gt;method: I believe this is intended to open an &lt;/SPAN&gt;&lt;STRONG&gt;existing .msd file&lt;/STRONG&gt;&lt;SPAN&gt;, not a map document (MXD).&amp;nbsp; It is odd that ArcGIS Server is still using MSD files even though the documentation says they've been replaced with SDs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Starting at ArcGIS 10.1 for Server, Map Server Definition (.msd) files have been replaced with Service Definition Draft (.sddraft) and Service Definition (.sd) files. Please use the CreateMapSDDraft function instead.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can treat SD and MSD files as zip-archives and take a peek at the internal structure.&amp;nbsp; I imagine it'd be possible to establish an SD "template" file and use it as a starting point for creating new services.&amp;nbsp; This would save you from the hassle of invoking the time-consuming Python methods for creating SDDRAFT and SD files on the fly, but I'm not sure all the added complexity would be worth it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 16:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257309#M6595</guid>
      <dc:creator>ErinBrimhall</dc:creator>
      <dc:date>2014-07-01T16:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create MSD in 10.2</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257310#M6596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;good stuff&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I cannot thank you enough for the info, Erin!&amp;nbsp; I knew that the MPK files were ZIP but it didn't occur to me that MSD and SD files were.&amp;nbsp; Just like Office 2007 files, I can unzip them, update them, and rezip them up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are right about the MSDHelper.&amp;nbsp; I saw someone else's code on the net and tried it, not looking at the signature of the &lt;/SPAN&gt;&lt;STRONG&gt;Open&lt;/STRONG&gt;&lt;SPAN&gt; method.&amp;nbsp; Should've done my homework.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, now I don't have to fall back to a hybrid 10.0 Server/10.2 Desktop solution to get the best of both worlds.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 18:10:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257310#M6596</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2014-07-01T18:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create MSD in 10.2</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257311#M6597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Upon reviewing the metadata, I agree that it would be too cumbersome to attempt.&amp;nbsp; Would be useful for a copy/paste of like-minded map services/layers.&amp;nbsp; But overall, far too risky and costly to develop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm back to my ArcGIS Server 10.0/Desktop 10.2.2 hybrid.&amp;nbsp; And that's fine I guess.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 19:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/create-msd-in-10-2/m-p/257311#M6597</guid>
      <dc:creator>DerivenC</dc:creator>
      <dc:date>2014-07-01T19:46:18Z</dc:date>
    </item>
  </channel>
</rss>

