title: MongoDB throwing "MongoDB.Bson.BsonSerializationException" on InsertOne
body: <p>I have the following Model:</p>
  
  <pre><code>Public class UserInfo{
   public string Id{get;}
   public   Dictionary&lt;string, string&gt; Metadata{ get; }
  }
  </code></pre>
  
  <p>When I try to add a new UserInfo to database which has:</p>
  
  <p><code>"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"</code> as a key name in Metadata to my collection using:</p>
  
  <pre><code>Dbcontext.myCollection.InsertOne(data);
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <blockquote>
    <p>MongoDB.Bson.BsonSerializationException: 'Element name
    '<a href="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" rel="nofollow noreferrer">http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name</a>' is not
    valid'.'</p>
  </blockquote>
  
  <p>I can tell that the issue is the dictionary having a url as a key, because when I removed this key from the dictionary, it worked fine, also when I used this value outside the dictionary it worked fine.</p>
  
  <p>How can I overcome this issue?</p>