The browser is blocking a cross-domain request as it usually allows a request in the same origin for security reasons.
You can simply add the following code in your web.config file of the remote site when you want to do a cross-domain request.
<?xml version="1.0" encoding="utf-8"?>
<add name="Access-Control-Allow-Origin" value="*" />
This does not work for the .net core application.
For ASP.NET core application, please kindly refer to the below guide: