title: Listing all available servers in network
body: <p>I have a Windows Form application that I made in C#. It is connected to a SQL Server database that is located on my computer (Full version of SQL Server 2012). I need to move this application to several different client's computers. The database that the clients will use will have all of the same fields as the one I am testing with, and it will be located on their computer/server.</p>
  
  <p>I decided to make a window open when the application launches that will give a list of available servers, databases and tables. When the form launches, a list of servers will populate a dropdown. When they choose a server, a list of databases will be shown in the next dropdown. When they choose a database, a list of tables will be show in the last dropdown. When the user clicks the <code>Log In</code> button, it will change the connection string in the <code>App.config</code> file.</p>
  
  <p>What I have somewhat works, but it seems as though the server list is incomplete</p>
  
  <pre><code>public initializationForm()
  {
      InitializeComponent();
  
      DataTable table = SqlDataSourceEnumerator.Instance.GetDataSources();
      foreach (DataRow server in table.Rows)
      {
          if (!this.serverComboBox.Items.Contains(server[table.Columns["ServerName"]].ToString()))
          {
              this.serverComboBox.Items.Add(server[table.Columns["ServerName"]].ToString());
          }
      }
  }
  </code></pre>
  
  <p>When I go to my list of networks in the File Explorer, there are 15 servers listed. But when I run this, only 3 are displayed. I also tried to install this on a development server that uses SQL Server 2012 Express. The server name on the development server is <code>SOMESERVER\SQLEXPRESS</code>, but this code only displays <code>SOMESERVER</code>.</p>
  
  <p>How can I get ALL of the servers shown in the File Explorer, and how can I get it to display the full server name? Thanks for the help!</p>
  
  <hr>
  
  <p>Resources I used:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/a6t1z9x2%28v=vs.110%29.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/a6t1z9x2%28v=vs.110%29.aspx</a></p>
  
  <p><a href="https://stackoverflow.com/questions/13462120/how-do-i-get-a-list-of-sql-servers-available-on-my-network">How do I get a list of SQL Servers available on my network?</a></p>