When i'm launch my web api application from visual studio all seems to work perfect. But when i'm trying to publish it and run it via IIS7 it doesnt work.
First step i create a controller with name Person.
public class PersonController : ApiController { // GET: api/Person public IEnumerable<string> Get() { return new string[] { "value1", "value2" }; } // GET: api/Person/5 public string Get(int id) { return "value"; } // POST: api/Person public void Post([FromBody]string value) { } // PUT: api/Person/5 public void Put(int id, [FromBody]string value) { } // DELETE: api/Person/5 public void Delete(int id) { } Then i'm choosing Publish, and selecting IIS,FTP,etc. Then i'm selecting Filesystem and rooting my path:
Here is my files inside folder
Then inside IIS i choose add new web site:
Now when i'm opening and trying to access in my controller i'm getting error below: http://localhost:8080/FirstSite/api/person
Is there something am i doing wrong? Is there something wrong with my files which i export?






http://localhost:8080/api/person.