title: ArrayTypeMismatchException thrown when adding MediaTypeHeaderValue to JsonFormatter.SupportedTypes
body: <p>I am trying to add a supported type to the JsonFormatter.SupportedMediaTypes collection and keep getting this error:</p>
  
  <p>System.ArrayTypeMismatchException: Attempted to access an element as a type incompatible with the array</p>
  
  <p>The only type that I can see the array taking is of MediaTypeHeaderValue. I cannot for the life of me figure out what is going on. HELP!</p>
  
  <p>My code:</p>
  
  <pre><code> Friend Sub Register(config As HttpConfiguration)
  
          config.MapHttpAttributeRoutes()
  
          config.Formatters.JsonFormatter.SupportedMediaTypes.Add(New MediaTypeHeaderValue("text/html"))
  
   End Sub
  </code></pre>