I have the following code which was working fine in .Net Framework but after upgrade it's throwing 404 error. This is basically my code :
[RoutePrefix("API")]
[BasicAuthenticationFilter]
public class APIController : ApiController
{
[Route("Contact/New")]
[HttpPost]
public HttpResponseMessage NewContact(ContactAPIRequest request)
{
}
[Route("Contact/Types")]
[HttpGet]
public HttpResponseMessage GetContactTypes()
{
}
}
I have it deployed on a website mangofruit.com(dummy name) and testing in Postman using https://mangofruit.com/API/Contact/New along with required authentication but I am getting a 404 error. I am also not able to access it using Visual Studio 2022.
Also https://mangofruit.com/API/Contact/Types throws an error 404. Am I missing something?
