Today, I wrote my very first ASP MVC WebService (.Net version 4, Entity4.2). It's really simple and just returns back an array of custom ItemChoice objects. When I call it directly from IE, it wants to download the json objects, and when I call it from FF, I see the XML version of the objects.
I'm working on integrating the web service into a page I'm building on localhost (to start), using the jquery 1.7.1 that ships with VS 12.
What happens when I call the service from JQuery is that the success function never runs. However, if I point getJSON to the local copy of the same service, it works. Looking at Charles Web Proxy, both come back and appear to have identical returns.
The code looks like this:
<script type="text/javascript">
$(document).ready(function() {
$.getJSON('http://myserver/CECService/api/itemchoices',
function (data, status) {
$.each(data, function(key, val) {
$('<option />', {value:val.itemValue, text:val.displayText}).appendTo('#School');
});//end each
});//end get json
});//end document.ready
</script>