<?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: ArcGIS Pro freezes attempting to connect to SDE in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779580#M1076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this in ArcGIS Pro 2.4 and see that the exception is being thrown in the GeoDatabase constructor.&amp;nbsp; However, i don't get the hanging issue, probably because i used QueuedTask.Run ....&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will report this to the dev team and check if there's a workaround for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2020 23:29:34 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2020-03-24T23:29:34Z</dc:date>
    <item>
      <title>ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779576#M1072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're creating an Arc Pro extension that allows users to create database connections to various file types, including GDB and SDE. Below is the code used to create a Geodatabase object out of an SDE connection. This works most of the time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/485866_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there is a case when this does not work, and ArcGIS Pro completely freezes up and eventually crashes. If I create a connection in the Catalog to a SQL database, that automatically creates an SDE. We need the SDE to access spatial data, so we take that SDE file path and use it to create a Geodatabase object using the code above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the "save password" option was not selected when the SQL connection was created, we get the freeze and crash.&amp;nbsp;It makes sense that we would not be able to connect in this case, but wouldn't this crash be considered a bug?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2020 21:12:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779576#M1072</guid>
      <dc:creator>DavidLaMartina</dc:creator>
      <dc:date>2020-03-20T21:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779577#M1073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see this in your code, maybe you have this in the calling function, but you must run "new GeoDatabase" from within the context of QueuedTask.Run.&amp;nbsp; You should see the following text in the help/intellisense string:&lt;/P&gt;&lt;P&gt;"&lt;SPAN style="color: #000000;"&gt;This method must be called on the MCT. Use QueuedTask.Run."&amp;nbsp; Whenever you see this you have to use QueuedTask.Run.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;In terms of code it should look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; sdeCon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;DatabaseConnectionFile&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;@"C:\Data\connection.sde"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Geodatabase sqlServerGeodatabase &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Geodatabase&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sdeCon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// Use the geodatabase.&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779577#M1073</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T08:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779578#M1074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I'm running the code in another thread. It's actually an STA Thread, but I tried changing it to a QueuedTask to no avail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Part of the reason this seems like a bug is that if it the freeze / crash happens once, and then I open up the same Project and try again, I get an (appropriate) error regarding no credentials. I believe this error is originating from ESRI code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 15:26:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779578#M1074</guid>
      <dc:creator>DavidLaMartina</dc:creator>
      <dc:date>2020-03-24T15:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779579#M1075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cannot duplicate your problem.&amp;nbsp; Using&amp;nbsp;QueuedTask.Run is not optional in an add-in.&amp;nbsp; I am running the code snippet above using Pro 2.5 without any problems.&amp;nbsp; What version of Pro are you using and how did you create the .sde connection files (what version of Pro) ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 22:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779579#M1075</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-03-24T22:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779580#M1076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this in ArcGIS Pro 2.4 and see that the exception is being thrown in the GeoDatabase constructor.&amp;nbsp; However, i don't get the hanging issue, probably because i used QueuedTask.Run ....&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will report this to the dev team and check if there's a workaround for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 23:29:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779580#M1076</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-03-24T23:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779581#M1077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;It turns out the problem (no user/password in the .sde connection file) has been fixed in ArcGIS Pro 2.6.&amp;nbsp; 2.6 is properly prompting for user/password entry when the attempt is made to open the geodatabase.&amp;nbsp; However, both 2.4 and 2.5 throw an exception (dialog cancelled) instead.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Below is a workaround code snippet (2.5) which prompts the user for username/password entry if a username/password has not been support in the .sde connection file.&amp;nbsp; I use a ProWindow to get the user/password string.&amp;nbsp; I attached the complete vs 2019 project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;async&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnClick&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;// this connection file has no user/password entered&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; sdeCon &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;DatabaseConnectionFile&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;@"C:\Users\wlfka\Documents\ArcGIS\Projects\MyTestSDe2\localhost.sde"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; sdeConProperties &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; DatabaseClient&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetDatabaseConnectionProperties&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sdeCon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsNullOrEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sdeConProperties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;User&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="comment token"&gt;// prompt for username / password using a ProWindow&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; userPwDlg &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;AddInDatabaseConnection&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      Module1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ConnectionString &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $&lt;SPAN class="string token"&gt;@"{sdeConProperties.AuthenticationMode} {sdeConProperties.Instance} {sdeConProperties.Database}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      userPwDlg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Owner &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; FrameworkApplication&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MainWindow&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      userPwDlg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Closed &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;o&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; dlgResult &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; userPwDlg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ShowDialog&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Module1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;HasCredentials &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      sdeConProperties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;User &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Module1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UserName&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      sdeConProperties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; Module1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Password&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; hasConnected &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;bool&lt;/SPAN&gt; bConnected &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Geodatabase sqlServerGeodatabase &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Geodatabase&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sdeConProperties&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
              IReadOnlyList&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Definition&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; fcList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sqlServerGeodatabase&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetDefinitions&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureClassDefinition&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetName&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
              &lt;SPAN class="comment token"&gt;// Use the geodatabase.&lt;/SPAN&gt;
              bConnected &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;catch&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt; ex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"Unable to connect: {sdeCon}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; bConnected&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;hasConnected&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Connected"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;catch&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt; ex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"Error: {ex.ToString()}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In essence the code parses the connection properties from the .sde file and then prompt for credential input.&amp;nbsp; It then uses the connection properties to connect and not the .sde file.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/486275_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;ProWindow saves the user/password in the module class and then closes.&amp;nbsp; i then user the connection properties to open the geodatabase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779581#M1077</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T08:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779582#M1078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, another issue has come up. What if the user created the SDE using operating system authentication, rather&amp;nbsp;than explicitly specifying the user and password? Implementing your check, we are now getting false positives for inadequate credentials when this is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the DatabaseConnectionProperties object in the debugger, and even though the connection was created using OS authentication, the AuthenticationMode property is still DBMS, rather than OSA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if the AuthenticationMode property doesn't change between SDE connections created with user / pass and those created with OS authentication, how can we distinguish between the two? I don't want to tell users using OSA that they have to enter credentials.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: To be clear, that AuthenticationMode property is ALWAYS DMBS, even when the connection was created with operating system authentication (OSA). Is this another bug that is going to be fixed in 2.6?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also removed the STA thread portion of my code and wrapped the Geodatabase instantiation in a QueuedTask. Even so, an uncredentialed connection results in an indefinite hang.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2020 20:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779582#M1078</guid>
      <dc:creator>DavidLaMartina</dc:creator>
      <dc:date>2020-04-07T20:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779583#M1079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I duplicated the problem you were seeing.&amp;nbsp; The property is not showing the correct value, which should be OSA and DBMS.&amp;nbsp; I tested in the current alpha version of 2.6 and it's a bug in that version as well.&amp;nbsp; I reported to issue to the GeoDatabase team.&amp;nbsp; I will give&amp;nbsp; an update if i hear of a fix or workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Wolf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2020 17:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779583#M1079</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-04-08T17:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779584#M1080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The bug where the AuthenticationMode property was not returning the correct value will be fixed in Pro 2.6 (summer 2020).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2020 17:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779584#M1080</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2020-04-25T17:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779585#M1081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The AuthenticationMode property should now be returning the correct value in Pro 2.6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2020 20:05:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/779585#M1081</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2020-07-29T20:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/1230852#M9059</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;We are facing the same issue with ArcGIS Pro 3.0.2. What about you?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2022 12:01:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/1230852#M9059</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-11-11T12:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro freezes attempting to connect to SDE</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/1234818#M9111</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to share Esri answer related to our problems described above:&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;It seems the issue related to the deadlock. since the below code snippet:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;protected override void OnClick()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{bool ret = QueuedTask.Run(() =&amp;gt;{}).Result;}, as they will be blocking the UI thread.&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Based on the code snippet: The top-level method synchronously blocks on the Task returned by queueTaskRun. This blocks the context thread.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Deadlock occurs. The top-level method is blocking the context thread, waiting for Geodatabase to complete, and bool ret = QueuedTask.Run(() =&amp;gt;{} is waiting for the context to be free so it can complete.&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Hope below two doc links helpful:&lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;&lt;A href="https://stackoverflow.com/questions/45352779/async-void-when-overriding" target="_blank"&gt;c# - async void when overriding - Stack Overflow&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;&lt;A href="https://blog.stephencleary.com/2012/07/dont-block-on-async-code.html" target="_blank"&gt;Don't Block on Async Code (stephencleary.com)&lt;/A&gt;"&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Using&amp;nbsp;QueuedTask.Run without Results works fine.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 07:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-freezes-attempting-to-connect-to-sde/m-p/1234818#M9111</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-11-24T07:11:14Z</dc:date>
    </item>
  </channel>
</rss>

