<?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 Unable to cast COM object (IMapServer --&amp;amp;gt; IMapServerObjects) in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-cast-com-object-imapserver-amp-gt/m-p/562791#M15169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have just deployed an AGS-based application to our web server. This app worked great in development, but after deployment to the server I get the following errror:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Carto.IMapServerObjects'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{651521F3-AAFF-42B9-8C2D-1980625A13BF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The C# code generating this error is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IServerContext context = som.CreateServerContext(ConfigurationManager.AppSettings["mapService"], "MapServer");
IMapServer mapServer = (IMapServer)context.ServerObject;
IMapServerObjects serverObjects = (IMapServerObjects)mapServer;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason, the IMapServer instance cannot be casted to IMapServerObjects. This is becoming quite critical.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jun 2010 11:55:38 GMT</pubDate>
    <dc:creator>NathanielWingfield</dc:creator>
    <dc:date>2010-06-14T11:55:38Z</dc:date>
    <item>
      <title>Unable to cast COM object (IMapServer --&amp;gt; IMapServerObjects)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-cast-com-object-imapserver-amp-gt/m-p/562791#M15169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have just deployed an AGS-based application to our web server. This app worked great in development, but after deployment to the server I get the following errror:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Carto.IMapServerObjects'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{651521F3-AAFF-42B9-8C2D-1980625A13BF}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The C# code generating this error is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;IServerContext context = som.CreateServerContext(ConfigurationManager.AppSettings["mapService"], "MapServer");
IMapServer mapServer = (IMapServer)context.ServerObject;
IMapServerObjects serverObjects = (IMapServerObjects)mapServer;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason, the IMapServer instance cannot be casted to IMapServerObjects. This is becoming quite critical.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jun 2010 11:55:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-cast-com-object-imapserver-amp-gt/m-p/562791#M15169</guid>
      <dc:creator>NathanielWingfield</dc:creator>
      <dc:date>2010-06-14T11:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to cast COM object (IMapServer --&gt; IMapServerObjects)</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-cast-com-object-imapserver-amp-gt/m-p/562792#M15170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The solution is: use an MXD-based map service. MSD-based map services are apparently lacking in the ArcObjects department. &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2272&amp;amp;t=284524#883049"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2272&amp;amp;t=284524#883049&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jun 2010 12:20:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/unable-to-cast-com-object-imapserver-amp-gt/m-p/562792#M15170</guid>
      <dc:creator>NathanielWingfield</dc:creator>
      <dc:date>2010-06-15T12:20:24Z</dc:date>
    </item>
  </channel>
</rss>

