<?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 Reading Layer results in COM Component Fail with 10.6 DLLs in .NET and the Esri JavaScript API Questions</title>
    <link>https://community.esri.com/t5/net-and-the-esri-javascript-api-questions/reading-layer-results-in-com-component-fail-with/m-p/882021#M95</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I'm having an issue upgrading from 10.5 to 10.6 libraries. When I try to get the layer information from a layer file it aborts. All I've done was to replace 10.5 with the 10.6 DLLs and this is what I get when I try to access the Workspace:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;BR /&gt;StackTrace: at ESRI.ArcGIS.Geodatabase.IDataset.get_Workspace()&lt;BR /&gt;...&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I have a licensed ArcGIS Server 10.6 installed on the same box and I am initializing the license successfully in the code, however it is failing when I try to access a layer file (I've tried layers from 10.2, 10.5 and 10.6 and this was working previously). Am I missing something in the new DLLs? All I'm trying to do is:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var layerFile = new LayerFileClass();&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;layerFile.Open(m_filename);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;...&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oLayer =&amp;nbsp;layerFile.Layer;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;...&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oDataLayer = oLayer as IDataLayer;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oDataset = oDataLayer as IDataset;&lt;BR /&gt;if (oDataset == null) return;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oWorkspace = oDataset.Workspace;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2018 18:19:03 GMT</pubDate>
    <dc:creator>EmanuelRamalho</dc:creator>
    <dc:date>2018-07-27T18:19:03Z</dc:date>
    <item>
      <title>Reading Layer results in COM Component Fail with 10.6 DLLs</title>
      <link>https://community.esri.com/t5/net-and-the-esri-javascript-api-questions/reading-layer-results-in-com-component-fail-with/m-p/882021#M95</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I'm having an issue upgrading from 10.5 to 10.6 libraries. When I try to get the layer information from a layer file it aborts. All I've done was to replace 10.5 with the 10.6 DLLs and this is what I get when I try to access the Workspace:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;BR /&gt;StackTrace: at ESRI.ArcGIS.Geodatabase.IDataset.get_Workspace()&lt;BR /&gt;...&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I have a licensed ArcGIS Server 10.6 installed on the same box and I am initializing the license successfully in the code, however it is failing when I try to access a layer file (I've tried layers from 10.2, 10.5 and 10.6 and this was working previously). Am I missing something in the new DLLs? All I'm trying to do is:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var layerFile = new LayerFileClass();&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;layerFile.Open(m_filename);&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;...&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oLayer =&amp;nbsp;layerFile.Layer;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;...&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oDataLayer = oLayer as IDataLayer;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oDataset = oDataLayer as IDataset;&lt;BR /&gt;if (oDataset == null) return;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;var oWorkspace = oDataset.Workspace;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2018 18:19:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-and-the-esri-javascript-api-questions/reading-layer-results-in-com-component-fail-with/m-p/882021#M95</guid>
      <dc:creator>EmanuelRamalho</dc:creator>
      <dc:date>2018-07-27T18:19:03Z</dc:date>
    </item>
  </channel>
</rss>

