title: Azure CosmosDB with MongoDB API with GridFS with C#
body: <p>I just created an Azure CosmosDB with MongoAPI and I am able to use the .NET driver to do all the basic operations with the same exact code, only by adding the connection string and settings to the MongoClient. The thing that breaks everything is that I am using GridFS and it does not seem to be supported, because I get a timeout exception when trying to upload a file using the method 'UploadFileFromStream' from the GridFSBucket class.</p>
  
  <p>Here's the full exception in case it gave you an idea: A timeout occured after 30000ms selecting a server </p>
  
  <pre><code>using CompositeServerSelector{ Selectors = ReadPreferenceServerSelector{ ReadPreference = { Mode : Secondary } }, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }.
  </code></pre>
  
  <p>Client view of cluster state is</p>
  
  <blockquote>
    <p>{ ClusterId : "1", ConnectionMode : "ReplicaSet", Type : "ReplicaSet", State : "Connected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/cr-dh-southcentralus.documents.azure.com:10255" }", EndPoint: "Unspecified/cr-dh-southcentralus.documents.azure.com:10255", State: "Connected", Type: "ReplicaSetPrimary", Tags: "{ region : South Central US }", WireVersionRange: "[0, 2]" }] }</p>
  </blockquote>
  
  <p>Did anybody encounter the same problem ? I would really need to have a solution which would not require any code change, so it would be perfect if I could figure something out to both work.</p>
  
  <p>Thanks a lot !</p>