Thank you very much, Brenden. The issue was with the IIS server, which I fixed and it is now working.
However, I am encountering another issue: "from origin 'http://localhost' has been banned by CORS policy: Response to preflight request fails access control check: it lacks HTTP ok status." Do you have any ideas? At the moment, the server does not have an SSL certificate.