JSONP Callbacks with the JsonpFormatter

This example demonstrates calling one of the Web API endpoints by using JSONP with a custom JSONP formatter, which allows for cross-domain access to JSON data. The configuration adds a custom JSONP formatter (in global.asax) that provides this functionality. This example is local by default, but if you access the albums URL remotely with a JSONP request it will serve the data cross-domain. (although this sample is local you can run this sample on another machine and point to that domain/url to test cross site operation).
Back to Samples Refresh

Albums loaded via JSONP: