<?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: BindLicense with multiple products in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317517#M8286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to both of you for your answers, but they didn't solve my problem. I tried both overloads of BindLicense(), but that makes no difference. In fact, according to the docs, BindLicense(product) binds to a Standard license level by default, so my code is equivalent to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bind() doesn't raise errors, but it doesn't check out a license either, so it's no good.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2014 06:52:05 GMT</pubDate>
    <dc:creator>BerendVeldkamp</dc:creator>
    <dc:date>2014-08-07T06:52:05Z</dc:date>
    <item>
      <title>BindLicense with multiple products</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317514#M8283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to check all installed products, and bind to the first available one. Now I have a machine with an expired Engine license, but with a valid Desktop license. The following code &lt;EM&gt;should&lt;/EM&gt; do the trick, but it doesn't. If the first checked license is not available, all others fail as well. If I change the order of the list, e.g. Desktop comes first, it works, if Engine is first, it doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;foreach (var product in new[] {ProductInfo.Engine, ProductCode.Desktop, ProductCode.Server})
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; try
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RuntimeManager.BindLicense(product, LicenseLevel.Standard);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Arcgis product {0} is licensed", product);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (RuntimeManagerException e)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Arcgis product {0} is not licensed", product);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(e.Message);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}

return false;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea why this doesn't work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317514#M8283</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2021-12-11T15:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: BindLicense with multiple products</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317515#M8284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No idea why it would fail but have you tried the alternate overloaded method of BindLicence(&lt;EM&gt;productcode&lt;/EM&gt;)? May be that will work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 15:58:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317515#M8284</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-08-06T15:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: BindLicense with multiple products</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317516#M8285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check with Bind (BindLicense bind and initialize)&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14073434913001132" jivemacro_uid="_14073434913001132"&gt;
&lt;P&gt;&lt;SPAN class="highlight-keyword"&gt;if&lt;/SPAN&gt; (!RuntimeManager.Bind(ProductCode.Engine))&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;SPAN class="highlight-keyword"&gt;if&lt;/SPAN&gt; (!RuntimeManager.Bind(ProductCode.Desktop))&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show(&lt;SPAN class="highlight-literal"&gt;"Unable to bind to ArcGIS runtime. Application will be shut down."&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="highlight-keyword"&gt;return&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Aug 2014 16:48:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317516#M8285</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2014-08-06T16:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: BindLicense with multiple products</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317517#M8286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to both of you for your answers, but they didn't solve my problem. I tried both overloads of BindLicense(), but that makes no difference. In fact, according to the docs, BindLicense(product) binds to a Standard license level by default, so my code is equivalent to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bind() doesn't raise errors, but it doesn't check out a license either, so it's no good.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 06:52:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317517#M8286</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2014-08-07T06:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: BindLicense with multiple products</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317518#M8287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bind binds to product but then you need initialize. It doesn't raise error if it doesn't bind product : it return false. While BindLicense is void. You need target project in x86&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_1407405135374656" jivemacro_uid="_1407405135374656"&gt;
&lt;P&gt;if (RuntimeManager.Bind(ProductCode.Server))&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAoInitialize aoInit = new AoInitializeClass();&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esriLicenseStatus a = aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcServer);&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/bindlicense-with-multiple-products/m-p/317518#M8287</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2014-08-07T09:56:40Z</dc:date>
    </item>
  </channel>
</rss>

