I have an app in React, that when we click on SUBMIT button the app redirect:
fetch(`https://ilqacitopsiis01/TicketMasterServer/validation?repoName=${repoName}&&branchName=${branchName}`)
The controller do some stuff and returns IActionResult(StatusCode of 500/502/200):
[HttpGet("validation")]
public IActionResult RequestBranchRepoNames(string repoName, string branchName)
When I'm running it locally in my computer with localhost it's running with no problems, but when I put it on IIS in order to deploy it just return 404, it mean that it's doesn't even ask from the controller the query. (like it doesn't know him).
Does anyone know what should I do so the react code will know the controller code also in IIS? (I already added web.config to my C# repo)
CodePudding user response:
I found the problem! I should have run the command
dotnet publish
And not npm run build in the client, and just rebuild the C# project. The publish folder created in the Debug->.net 5.0.