Hi,
I am calling the web api get method in the browser it is working fine.but I trying to call this in asp.net page it is asking the follwing in IE.
"This page is accessing inofrmation that is not under its control.This process a security risk.Do you want to continue?"
Where as in the Firfox or crome. it is not working. My code is below
Any one tell me where I am wrong.
I am calling the web api get method in the browser it is working fine.but I trying to call this in asp.net page it is asking the follwing in IE.
"This page is accessing inofrmation that is not under its control.This process a security risk.Do you want to continue?"
Where as in the Firfox or crome. it is not working. My code is below
Code:
<script type="text/javascript">
function GetAllEmployees() {
jQuery.support.cors = true;
$.ajax({
url: 'http://localhost/virtusapi/sublocation/GetAllTables/1',
type: 'GET',
dataType: 'jsonp',
success: function (data) {
for (var i = 0; i < data.length; i++) {
var course = data[i];
alert(course.Name);
}
},
error: function (x, y, z) {
alert(x + '\n' + y + '\n' + z);
}
});
}
</script>