Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://sample.ent
<pre><code>var url= 'http://sample.net:8051/admin/singleprofile';
        $.ajax({
            url: url,
            crossOrigin: true,
            type: 'GET',
            xhrFields: { withCredentials: true },
            accept: 'application/json'
        }).done(function (data) {
            console.log(data);                
        }).fail(function (xhr, textStatus, error) {
            var title, message;
            switch (xhr.status) {
                case 403:
                    title = xhr.responseJSON.errorSummary;
                    console.log('Please login to your server before running the test.');
                    break;
                default:
                    title = 'Invalid URL or Cross-Origin Request Blocked';
                    console.log('You must explicitly add this site (' + window.location.origin + ') to the list of allowed websites in your server.');
                    break;
            }
        });
</code></pre>

<p>From above code I am getting below issue:
You must explicitly add this site <code>(' + window.location.origin + ')</code> to the list of allowed websites in your server.</p>