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:
Article ID: 1980, Created: August 31, 2018 at 8:26 PM, Modified: July 8, 2021 at 7:19 PM