<?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 Problems with AppROTClass in 10.2.2 Desktop. in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283752#M7310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am converting an automation utility from ArcMap 9.3 to 10.2.2.&amp;nbsp; I changed some references and added binding to the Desktop license.&amp;nbsp; In 9.3 I was able to connect to an existing instance of ArcMap using the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;AppROT rot = new AppROTClass();&lt;/STRONG&gt;&amp;nbsp; &lt;EM&gt;// WORKS in 9.3, THROWS EXCEPTION in 10.2.2&lt;/EM&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 10.2.2 this throws a COM exception about the class not existing.&amp;nbsp; However, in 10.2.2 when I create the instance of ArcMap in my code, the AppROT works.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IDocument doc =&amp;nbsp; (IDocument) new ESRI.ArcGIS.ArcMapUI.MxDocumentClass();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; AppROT rot = new AppROTClass();&lt;/STRONG&gt; &lt;EM&gt; // WORKS in 10.2.2&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why I cannot connect to an existing instance of ArcMap in 10.2.2?&amp;nbsp; Thanks.&amp;nbsp; Mary Sage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 22:11:14 GMT</pubDate>
    <dc:creator>MarySage</dc:creator>
    <dc:date>2014-09-16T22:11:14Z</dc:date>
    <item>
      <title>Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283752#M7310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am converting an automation utility from ArcMap 9.3 to 10.2.2.&amp;nbsp; I changed some references and added binding to the Desktop license.&amp;nbsp; In 9.3 I was able to connect to an existing instance of ArcMap using the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;AppROT rot = new AppROTClass();&lt;/STRONG&gt;&amp;nbsp; &lt;EM&gt;// WORKS in 9.3, THROWS EXCEPTION in 10.2.2&lt;/EM&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In 10.2.2 this throws a COM exception about the class not existing.&amp;nbsp; However, in 10.2.2 when I create the instance of ArcMap in my code, the AppROT works.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IDocument doc =&amp;nbsp; (IDocument) new ESRI.ArcGIS.ArcMapUI.MxDocumentClass();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; AppROT rot = new AppROTClass();&lt;/STRONG&gt; &lt;EM&gt; // WORKS in 10.2.2&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why I cannot connect to an existing instance of ArcMap in 10.2.2?&amp;nbsp; Thanks.&amp;nbsp; Mary Sage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 22:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283752#M7310</guid>
      <dc:creator>MarySage</dc:creator>
      <dc:date>2014-09-16T22:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283753#M7311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now, the above code does not work in 10.2.2.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting the exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System.Runtime.InteropServices.COMException (0x80040111): Retrieving the COM class factory for component with CLSID {FABC30FB-D273-11D2-9F36-00C04F6BC61A} failed due to the following error: 80040111.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Did I mention I'm trying to execute the sample:&amp;nbsp; DesktopAutomationCS2010?&amp;nbsp;&amp;nbsp; I added the bind to the Desktop for the license.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 00:06:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283753#M7311</guid>
      <dc:creator>MarySage</dc:creator>
      <dc:date>2014-09-17T00:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283754#M7312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We currently encounter similar error message on 10.2.2 Desktop, however the scenario might be a little bit different:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;new AppROTClass() &lt;/STRONG&gt;throws the same exception as you get if and only if there's already an instance of AppRot.exe running on the system (under the same user account, with elevated = yes). The programm calling new AppROTClass() is being executed as a windows task scheduler triggered executable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second time the task is triggered, the exception hits us (while the first time works and instanciates AppROT.exe). If I kill the AppROT.exe process before the task is triggered the second time, things work well, too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, the binding is made properly. And creating a new AppROTClass should not need any other licensing, except for the binding to Desktop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a bit worried about the AppROT.exe running elevated. What else could be involved? The scheduler task is being executed with a user having local administrator privileges (and that might explain the elevation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this additional info helps to track this problem down?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Oct 2014 14:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283754#M7312</guid>
      <dc:creator>AndryJoos</dc:creator>
      <dc:date>2014-10-23T14:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283755#M7313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you found a work around for the problem using AppRot with 10.2.2?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2014 23:35:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283755#M7313</guid>
      <dc:creator>MichaelCiscell</dc:creator>
      <dc:date>2014-12-04T23:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283756#M7314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael. No, not yet and we have not taken further steps in resolving this (requirements changed and we did not need to find a proper solution). Still, for future projects or implementations, it would obviously be good if there'd be a solution to this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 07:38:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283756#M7314</guid>
      <dc:creator>AndryJoos</dc:creator>
      <dc:date>2014-12-05T07:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283757#M7315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andry. So everything you’ve seen indicates this is an esri problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 14:15:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283757#M7315</guid>
      <dc:creator>MichaelCiscell</dc:creator>
      <dc:date>2014-12-05T14:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283758#M7316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't vouch for it, but yes. It looks like broken behaviour or wrong documentation or something along these lines. Of course, I might also be doing something wrong after all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 14:19:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283758#M7316</guid>
      <dc:creator>AndryJoos</dc:creator>
      <dc:date>2014-12-05T14:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283759#M7317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andry,&lt;/P&gt;&lt;P&gt;I think its a security issue that started with vista, see &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//000100000nr1000000" rel="nofollow noopener noreferrer" target="_blank"&gt;AppROT and Windows Vista&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For me, the following only works if both arcmap and the console app are running at the same permissions (both elevated or both not, but not a mix). If they're different, I get the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //find Arcmap and change title
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IApplication app = null;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAppROT appRot = new AppROTClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; appRot.Count; i++)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (appRot.get_Item(i) is IMxApplication)
&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; app = appRot.get_Item(i);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.Caption = "Connected";
&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; if (appRot == null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show("unable to find arcmap");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe try an application manifest?&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:43:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283759#M7317</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T13:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with AppROTClass in 10.2.2 Desktop.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283760#M7318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sean. As it turns out, what we needed was whether there is Arc running and what level is being used (AI, AE or AV). Found out that we have a file from the license manager that tells us that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will pass this on to the developer to watch for this issue in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 20:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/problems-with-approtclass-in-10-2-2-desktop/m-p/283760#M7318</guid>
      <dc:creator>MichaelCiscell</dc:creator>
      <dc:date>2014-12-05T20:54:10Z</dc:date>
    </item>
  </channel>
</rss>

