title: UWP App can't connect to MongoDB when packed for deploy
body: <p>I'm developing a UWP app using C# and the MongoDB connection works perfectly in the development computer. When I tried to export and install it in a different desktop it did not work.</p>
  
  <p>I have some peculiarities on the target computer: no internet and no Visual Studio. I export my app, using the "Create App Packages" on Visual Studio, install all dependencies in the target desktop, and install the App.</p>
  
  <p>Everything works, but the MongoDB Connection. When it tries to connect to the MongoDB Serve (local installation on target computer), it can't connect and I receive a timeout error.</p>
  
  <p>What I know so far:</p>
  
  <ul>
  <li>Nothing is wrong with the MongoDB installation, I can connect to it from the Mongo Compass and from a working 'App' from a different computer.</li>
  <li>When I downloaded the Remote Debug Tools from Visual Studio, I got a message "installing missing libraries", and it started working (I had to get a new windows installation to reproduce the problem, without remote debugging).</li>
  <li>I already tried to install the missing NuGet packages (MongoDB.Driver, MongoDB.Bson and MongoDB.Driver.Core) on the target computer, but it did not seem to change anything.</li>
  <li>Firewall is disabled.</li>
  <li>All permissions were added to the UWP app.</li>
  <li>Tried to connect without the loopback, but also did not work <strong>(EDIT)</strong></li>
  </ul>
  
  <p>Target windows version: 1809</p>
  
  <p>MongoDB Packages version: 2.9.2</p>
  
  <p>Visual Studio: 17</p>
  
  <pre class="lang-cs prettyprint-override"><code>_client = new MongoClient(connectString);
  _db = _client.GetDatabase(database);
  
  BsonDocument doc = _instance._db.RunCommand((Command&lt;BsonDocument&gt;)"{ping:1}");
  IsConnected = doc["ok"] == 1;
  Logger.Log("[MONGO] Connected to MongoDB");
  </code></pre>
  
  <p>Error message: "A timeout occured after 30000ms selecting a server using CompositeServerSelector...."</p>