Base solution for your next web application
Open Closed

500 error instead 401 on invalid username and password at login #9646


User avatar
0
adamphones created

Version: asp zero 8.6 angular.

On dev we get exception with modal( sweetalert) 'Invalid username or password'. On production user does not get any modal on the wrong credantials. When I view F12 network I can see the error message comes back on authenticate call is 500 instead of 401 on production. I believe as a result the modal does not appear on production.

Any idea how to fix this? Is this an appsetting issue? or any setting we need to change on IIS to get the error modal working?

Note that when I change launchSettings.json to Production the issue occurs. On Development it shows the modal fine.

Both dev and production appsettings are indentical and the issue still persists.

Thanks,


1 Answer(s)
  • User Avatar
    0
    zony created
    Support Team

    Hi adamphones, If you are deploying to IIS in this situation, please read here. In addition, can you share the launchSettings.json and web.conf files, which helps us to troubleshoot errors.