asp.net cross domain in Chrome

I have below codes with cross domain issue in Chrome and Firefox.
And I did install below links from Chrome but still not working.

However, IE working with enable the cross domain under Internet Option >> Security Tab

Any ideas

function GetModelList(divisCode)
      var customerNo = "315217";            
        var GetModelListJSon = "http://clientaccesstest.abc/GetModel";            
        $(document).ready(function () {
            $.ajax({
                cache: false,
                type: "GET",
                async: false,
                dataType: "json",
                contentType: 'text/plain',
                url: GetModelListJSon + encodeURIComponent("(011,115217)"),
                success: function (data) {
                    $('#data').html(data);
                    if (data == null)
                        return;
                    resultObj = jQuery.parseJSON(data);
                    if (resultObj.Status != 'Failed') {
                        $('#json').html(setModelInfo(resultObj.Data,divisCode));
                    }
                },
                error: function (xhr,status,error) {
                    $('#data').html(xhr.responseText);
                    alert(xhr.responseText + " : error GetModelListJSon");
alert(status);
alert(error);
                }
            });
        });
}


https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en
https://chrome.google.com/webstore/detail/forcecors/oajaiobpeddomajelicdlnkeegnepbin/related?hl=en

http://codedevstuff.blogspot.com/2014/10/use-chrome-for-development-and-allow.html
LVL 1
ITsolutionWizardAsked:
Who is Participating?
 
SriVaddadiCommented:
Please check if your server is restricting the cross-domain calls. Also, debug and check if the call is going to the server or not.
0
 
SriVaddadiCommented:
use

dataType: "jsonp" in place of dataType: "json" and try
0
 
ITsolutionWizardAuthor Commented:
add dataType: : "jsonp" - The error still occurs.

Thank you for your time to help ....
0
 
SriVaddadiCommented:
please try this
function GetModelList(divisCode)
      var customerNo = "315217";            
        var GetModelListJSon = "http://clientaccesstest.abc/GetModel";            
        $(document).ready(function () {
            $.ajax({
              crossDomain: true,
                cache: false,
                type: "GET",
                async: false,
                dataType: "json",
                contentType: 'text/plain',
                url: GetModelListJSon + encodeURIComponent("(011,115217)"),
                success: function (data) {
                    $('#data').html(data);
                    if (data == null)
                        return;
                    resultObj = jQuery.parseJSON(data);
                    if (resultObj.Status != 'Failed') {
                        $('#json').html(setModelInfo(resultObj.Data,divisCode));
                    }
                },
                error: function (xhr,status,error) {
                    $('#data').html(xhr.responseText);
                    alert(xhr.responseText + " : error GetModelListJSon");
alert(status);
alert(error);
                }
            });
        });
}
0
 
ITsolutionWizardAuthor Commented:
add crossDomain: true, the problem still does not resolve....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.