title: Invalid credentials error for Bing Maps in ASP.NET Core project
body: <p>I tried to add an aerial map to my web application. This is my Contacts.cshtml:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="row justify-content-center text-center"&gt;
      &lt;h1&gt;Location&lt;/h1&gt;
      &lt;hr class="border border-white border-3"/&gt;
      &lt;div id="myMap" style="width:63%;height:500px;"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  @section Scripts
  {
      &lt;script type='text/javascript'
              src='https://www.bing.com/api/maps/mapcontrol?callback=GetMap&amp;key=[my API key]'
              async defer&gt;&lt;/script&gt;
      &lt;script type='text/javascript'&gt;
          function GetMap() {
              var map = new Microsoft.Maps.Map('#myMap', {
                  credentials: 'my API key',
                  center: new Microsoft.Maps.Location(51.50632, -0.12714),
                  mapTypeId: Microsoft.Maps.MapTypeId.aerial,
                  zoom: 10
              });
          }
      &lt;/script&gt;
  }</code></pre>
  </div>
  </div>
  </p>
  <p>I have registered to <a href="https://www.bingmapsportal.com" rel="nofollow noreferrer">https://www.bingmapsportal.com</a> and created 2 differend API keys:<a href="https://i.stack.imgur.com/sXUjC.png" rel="nofollow noreferrer">API keys</a></p>
  <p>I tried with both of them but when the map visualizes it shows me the following error message:
  <a href="https://i.stack.imgur.com/SJtun.jpg" rel="nofollow noreferrer">The specified credentials are invalid. You can sign up for a free developer account.</a></p>
  <p>I don't understand what the problem is. I found several topics with the same problem but I couldn't find any suggested solutions that work for me. Please, help!</p>