The problem comes because you are trying to make an ajax call to a different domain than the one that is serving the front. From the backend you have to indicate that you "accept" calls from the front domain (or enable any domain with *
, useful for public api's). To do this you must respond to requests with the following headers (so that the browser accepts the answers).
// Headers para habilitar el acceso a tu front (En el caso que propones)
"Access-Control-Allow-Origin", "localhost:53100"
"Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"
// Habilitar el acceso desde cualquier dominio
"Access-Control-Allow-Origin", "*"
"Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"
In ASP.NET I can not help you at the code level, but here is a link that can help you link
This is known as CORS (Cross-Origin Resource Sharing) . If you search in google enable CORS in ASP.NET , you will find a lot of links that will help you.
I hope I have cleared your doubts a little more!