I am coming across a very strange issue in my application. In my local development I have two endpoints:
[HttpGet(Name = "GetAllReviewSummary")]
[Authorize]
[OktaAllowedRoles(["test-role"])]
[EnableRateLimiting("api")]
public async Task<IActionResult> GetAll()
{
return Ok(await _reviewSummaryService.GetAllAsync());
}
[HttpGet("{userId}")]
[Authorize]
[OktaAllowedRoles(["test-role"])]
[EnableRateLimiting("api")]
public async Task<IActionResult> Get(int userId)
{
return Ok(await _reviewSummaryService.GetAsync(userId));
}
}
In my local environment these both work great. When I deploy this web api to IIS I get
404 Not Found
For any endpoints that are using [HttpGet(“{parameter}”)] where as [HttpGet(Name = “blah”)] works. I noticed this in all of my controllers so that is why I am thinking this is the issue. Is there something additional I need to add to make this routing method work?