<?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: Why does opening SDE Workspace Factory ask for credentials again? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436876#M11822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there. Thank you for your response.&lt;BR /&gt;Yes this is a copy of the original code. These are variables,coming as parameters, in the original code. So I changed them here for the clarity of code. The spellings are correct in the original code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One tricky property for me is the "instance". I'm not really sure which is the correct value to use.&lt;BR /&gt;If I right click my ArcSDE database in ArcCatalog, and click on "Connection Properties", the instance value is same as my Server name (raecgissql)&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/439086_pastedImage_1.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I open the connection properties from the SQL Server Management Studio, The Instance is shown to be empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/439087_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use, empty string in my code. No exception is thrown, but it asks for the credentials again.&lt;BR /&gt;When I use "raecgissql" (similar to ArcCatalog) then an exception is thrown , something like "SDE not found in the listings".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Mar 2019 03:18:43 GMT</pubDate>
    <dc:creator>Muhammad_TayyabMir</dc:creator>
    <dc:date>2019-03-11T03:18:43Z</dc:date>
    <item>
      <title>Why does opening SDE Workspace Factory ask for credentials again?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436874#M11820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to open SDE Workspace Factory using&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#IWorkspaceFactory_Open.htm" rel="nofollow noreferrer noopener" target="_blank"&gt;IWorkspaceFactory.Open&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I give the complete Property set in the code to open.&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="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;ESRI&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;ArcGIS&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;esriSystem&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;IPropertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; propertySet &lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #101094; border: 0px; font-weight: inherit; font-size: 13px;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; ESRI&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;ArcGIS&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;esriSystem&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;PropertySetClass&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;();
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"SERVER"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"myServer"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"INSTANCE"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"myinstance"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"AUTHENTICATION_MODE"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"DBMS"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"DATABASE"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"myDatabase"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"USER"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"sde"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"PASSWORD"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"sdePassword"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;propertySet&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #2b91af; border: 0px; font-weight: inherit; font-size: 13px;"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"VERSION"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #7d2727; border: 0px; font-weight: inherit; font-size: 13px;"&gt;"sde.DEFAUALT"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #303336; border: 0px; font-weight: inherit; font-size: 13px;"&gt;);&lt;/SPAN&gt;&lt;/CODE&gt; 

IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory(); 
IWorkspace workspace = workspaceFactory.Open(propertySet,0);&lt;/PRE&gt;&lt;P&gt;But When the&amp;nbsp;&lt;CODE&gt;workspaceFactory.Open&lt;/CODE&gt;&amp;nbsp;is called, a dialogue box is opened to ask for credentials again.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439085" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/439085_pastedImage_13.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why does this happen?&lt;/P&gt;&lt;P&gt;Also, Can someone tell me what does the second parameter of&amp;nbsp;&lt;A href="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#IWorkspaceFactory_Open.htm" rel="nofollow noreferrer noopener" target="_blank"&gt;IWorkspaceFactory.Open&lt;/A&gt;&amp;nbsp;"hWnd" represent? I couldnt find a proper explanation in the documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:34:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436874#M11820</guid>
      <dc:creator>Muhammad_TayyabMir</dc:creator>
      <dc:date>2021-12-11T19:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why does opening SDE Workspace Factory ask for credentials again?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436875#M11821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming this is a copy of your actual code just with removed password and server. You spelled default wrong, which would cause it to not open automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The hWnd represents the window handle of a parent window.&amp;nbsp; This only comes into play if you were writing a custom standalone application.&amp;nbsp; Then you could use the handle of the form that was the parent of the dialog.&amp;nbsp; But if you don't want it to open than 0 is the proper value.&amp;nbsp; Also even in a standalone 0 works just fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Mar 2019 17:30:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436875#M11821</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2019-03-10T17:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does opening SDE Workspace Factory ask for credentials again?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436876#M11822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there. Thank you for your response.&lt;BR /&gt;Yes this is a copy of the original code. These are variables,coming as parameters, in the original code. So I changed them here for the clarity of code. The spellings are correct in the original code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One tricky property for me is the "instance". I'm not really sure which is the correct value to use.&lt;BR /&gt;If I right click my ArcSDE database in ArcCatalog, and click on "Connection Properties", the instance value is same as my Server name (raecgissql)&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/439086_pastedImage_1.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I open the connection properties from the SQL Server Management Studio, The Instance is shown to be empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/439087_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use, empty string in my code. No exception is thrown, but it asks for the credentials again.&lt;BR /&gt;When I use "raecgissql" (similar to ArcCatalog) then an exception is thrown , something like "SDE not found in the listings".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2019 03:18:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436876#M11822</guid>
      <dc:creator>Muhammad_TayyabMir</dc:creator>
      <dc:date>2019-03-11T03:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why does opening SDE Workspace Factory ask for credentials again?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436877#M11823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you attempting to pass in Direct-Connect parameters in your property set?&amp;nbsp; If so you likely need to add several parameters, and also make sure your Instance parameter is correct.&amp;nbsp; (We have an Oracle database and the Instance parameter to be passed in via PropertySet is different than what ArcCatalog reports - not sure if that&amp;nbsp;is the same for your SQL Server database or not...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 21:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436877#M11823</guid>
      <dc:creator>JeffMatson</dc:creator>
      <dc:date>2019-03-22T21:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why does opening SDE Workspace Factory ask for credentials again?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436878#M11824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had the same problem, until i try to set the "instance" property to "sde:sqlserver:MY_SQLSERVER_NAME". And is all right.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Jun 2019 09:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/why-does-opening-sde-workspace-factory-ask-for/m-p/436878#M11824</guid>
      <dc:creator>MichaelBarsky</dc:creator>
      <dc:date>2019-06-29T09:44:42Z</dc:date>
    </item>
  </channel>
</rss>

