I have an ASP .Net Core 1.1 MVC Web Api. In it, I have a controller that doesn't seem to be working. When I navigate to one of it's actions (it only has one) it doesnt trigger:
namespace InspectionsWebApi.Controllers { [Produces("application/json")] [Route("api/ValidateUsers")] public class ValidateUsersController : Controller { private readonly InspectionsContext _context; private readonly ILogger<UsersController> _logger; public ValidateUsersController(InspectionsContext context, ILogger<UsersController> logger) { _context = context; _logger = logger; } // GET: api/ValidateUsers/abcde12345 [HttpGet("nameIdentifier")] public async Task<IActionResult> ValidateUser([FromRoute] string nameIdentifier) { // This code never fires } } }
and I navigate to
http://localhost:50082/api/validateusers/john123
I get a 404 error.