I run the default example created by the environment for the Web API project:

ValuesController.cs

 // GET api/values public IEnumerable<string> Get() { return new string[] { "value1", "value2" }; } // GET api/values/5 public string Get(int id) { return "value"; } // POST api/values public void Post([FromBody]string value) { } // PUT api/values/5 public void Put(int id, [FromBody]string value) { } // DELETE api/values/5 public void Delete(int id) { } 

Сhrome

In the Chrome browser, I specify http://localhost:58534/api/values and appears in the window:

enter image description here

Internet Explorer

In IE, I specify http://localhost:58534/api/values and some strange file ( values.cwshbzg.partial ) is values.cwshbzg.partial and it is empty.

Question

Why it happens? If we talk about authorization, then I do not need it yet. I want the service to work without the need to log in.

  • one
    And the [Authorize] attribute for the class of this controller is not the case? - koks_rs
  • Yes, he was. Removed [Authorize] and earned. - Adam

0