79072539

Date: 2024-10-10 02:23:41
Score: 1
Natty:
Report link

In my scenario, I have provided router path under namespace of the controller. Also, by having View() method in the same controller. remove the View() method if it is an API project. It will help to resolve the issue.


namespace [project_name]{
[Route("api/[controller]")]
[ApiController]
public class AuthController : Controller
{
public IActionResult Index()
{
    return View();
}
public IActionResult Authenticate(string password, string email)
{
// code here
}
}
}
Reasons:
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user27724583