title: Authorization has been denied for this request error when running webapi in MVC project
body: <p>I have created an ASP.Net MVC project with WebApi option. Then modified the values controller with the code below:</p>
  
  <pre><code>public class ValuesController : ApiController
  {
      static List&lt;string&gt; data = initList();
  
      private static List&lt;string&gt; initList()
      {
          var ret = new List&lt;string&gt;();
          ret.Add("value1");
          ret.Add( "value2" );
  
          return ret;
      }
  
      // GET api/values
      public IEnumerable&lt;string&gt; Get()
      {
          return data ;
      }
  
      // GET api/values/5
      public string Get(int id)
      {
          return data[id];
      }
  
      // POST api/values
      public void Post([FromBody]string value)
      {
          data.Add(value);
      }
  
      // PUT api/values/5
      public void Put(int id, [FromBody]string value)
      {
          data[id] = value;
      }
  
      // DELETE api/values/5
      public void Delete(int id)
      {
          data.RemoveAt(id);
      }
  }
  </code></pre>
  
  <p>When I am running the project and navigating to API/values URL, the following image is showing error.</p>
  
  <p><img src="https://i.stack.imgur.com/0Rq9t.png" alt="error when running webapi MVC project">.</p>
  
  <p>The error description in text is:</p>
  
  <blockquote>
    <p>&lt;Error&gt;
     Authorization has been denied for this request.  
    &lt;/Error&gt;</p>
  </blockquote>