<?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 Using ArcObjects 10.2.2 in standard .Net Web Service  in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-arcobjects-10-2-2-in-standard-net-web/m-p/242340#M6278</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Hello everyone,&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;Environment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ArcGIS Desktop 10.2.2&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;ArcGIS Server 10.2.2&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;VS 2010 or VS 2012&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;Application Pool: Set to True, Enable 32-bit applications property in IIS app pool.&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;Error message: Unable to cast COM object of type 'ESRI.ArcGIS.esriSystem.AoInitializeClass' to interface type 'ESRI.ArcGIS.esriSystem.IAoInitialize'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9AB6A638-ACA8-4820-830C-463EA11C8722}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))&lt;/LI&gt;&lt;LI style="font-size: 11pt;"&gt;Already applied &lt;A _jive_internal="true" href="https://community.esri.com/message/64797"&gt;&lt;SPAN style="text-decoration: underline;"&gt;https://community.esri.com/message/64797&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;I created a standard web service using VB.Net and VS 2010, in ArcGIS 10.2. then I added ArcGIS references:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Imports ESRI.ArcGIS.esriSystem&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;to the Vb.Net Web Service project:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server)&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_AOInit = New AoInitializeClass()&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim licenseStatus As esriLicenseStatus = m_AOInit.Initialize (esriLicenseProductCode.esriLicenseProductCodeArcServer)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *****************&amp;nbsp; THIS LIE RETURNS THE ERROR MESSAGE BELOW:&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;I ran the web service in&amp;nbsp;Debug mode and it fails when it reaches the following line:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&lt;STRONG&gt;Dim licenseStatus As esriLicenseStatus = m_AOInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;with error message:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Unable to cast COM object of type 'ESRI.ArcGIS.esriSystem.AoInitializeClass' to interface type 'ESRI.ArcGIS.esriSystem.IAoInitialize'.&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;This operation failed because the QueryInterface call on the COM component for the interface with IID '{9AB6A638-ACA8-4820-830C-463EA11C8722}'&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Please download zip file that contains a standard vb.net web service where I added these 3 lines in the Hello World method, and now it returns the error message.&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Any suggestion? Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2018 14:23:21 GMT</pubDate>
    <dc:creator>JoseSanchez</dc:creator>
    <dc:date>2018-04-20T14:23:21Z</dc:date>
    <item>
      <title>Using ArcObjects 10.2.2 in standard .Net Web Service</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-arcobjects-10-2-2-in-standard-net-web/m-p/242340#M6278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Hello everyone,&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;Environment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ArcGIS Desktop 10.2.2&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;ArcGIS Server 10.2.2&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;VS 2010 or VS 2012&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;Application Pool: Set to True, Enable 32-bit applications property in IIS app pool.&lt;/LI&gt;&lt;LI style="color: #000000; font-size: 11pt;"&gt;Error message: Unable to cast COM object of type 'ESRI.ArcGIS.esriSystem.AoInitializeClass' to interface type 'ESRI.ArcGIS.esriSystem.IAoInitialize'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{9AB6A638-ACA8-4820-830C-463EA11C8722}' failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))&lt;/LI&gt;&lt;LI style="font-size: 11pt;"&gt;Already applied &lt;A _jive_internal="true" href="https://community.esri.com/message/64797"&gt;&lt;SPAN style="text-decoration: underline;"&gt;https://community.esri.com/message/64797&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;I created a standard web service using VB.Net and VS 2010, in ArcGIS 10.2. then I added ArcGIS references:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Imports ESRI.ArcGIS.esriSystem&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;to the Vb.Net Web Service project:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server)&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_AOInit = New AoInitializeClass()&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim licenseStatus As esriLicenseStatus = m_AOInit.Initialize (esriLicenseProductCode.esriLicenseProductCodeArcServer)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *****************&amp;nbsp; THIS LIE RETURNS THE ERROR MESSAGE BELOW:&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;I ran the web service in&amp;nbsp;Debug mode and it fails when it reaches the following line:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&lt;STRONG&gt;Dim licenseStatus As esriLicenseStatus = m_AOInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;with error message:&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Unable to cast COM object of type 'ESRI.ArcGIS.esriSystem.AoInitializeClass' to interface type 'ESRI.ArcGIS.esriSystem.IAoInitialize'.&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;This operation failed because the QueryInterface call on the COM component for the interface with IID '{9AB6A638-ACA8-4820-830C-463EA11C8722}'&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Please download zip file that contains a standard vb.net web service where I added these 3 lines in the Hello World method, and now it returns the error message.&lt;/P&gt;&lt;P style="margin: 0in 0in 8pt;"&gt;Any suggestion? Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/using-arcobjects-10-2-2-in-standard-net-web/m-p/242340#M6278</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2018-04-20T14:23:21Z</dc:date>
    </item>
  </channel>
</rss>

