title: Error while calling parameterized MVC 4 Web API using jquery
body: <p>I have created a MVC 4 Web API, which expect a parameter. This works fine when I directly call it by putting url in browser. Now I am trying to call this API with data and with complete url(with parameter) both , through jquery on an aspx page . My code looks like  </p>
  
  <pre><code>$.ajax
              ({
                  type: "GET",
                  url: 'http://MySite/Test/api/product/?context=001',
                  dataType: "jsonp",
                  //data:{"context": "001")},
                  crossDomain : true,
                  async:false,
                  success: function (result) {
                      alert(result);
                  },
                  error: function (data) {
                      alert(data);
              }
              });
  </code></pre>
  
  <p>But always I get response in 'error' function as [object Object]. 
  When I expand the returned object I found following</p>
  
  <pre><code>Object
  abort: function (a){a=a||"abort",p&amp;&amp;p.abort(a),w(0,a);return this}
  always: function (){i.done.apply(i,arguments).fail.apply(i,arguments);return this}
  complete: function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&amp;&amp;e!==!0&amp;&amp;(j=a,n(e[0],e[1]))}return this}
  done: function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&amp;&amp;e!==!0&amp;&amp;(j=a,n(e[0],e[1]))}return this}
  error: function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&amp;&amp;e!==!0&amp;&amp;(j=a,n(e[0],e[1]))}return this}
  fail: function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&amp;&amp;e!==!0&amp;&amp;(j=a,n(e[0],e[1]))}return this}
  getAllResponseHeaders: function (){return s===2?n:null}
  getResponseHeader: function (a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c}
  isRejected: function (){return!!e}
  isResolved: function (){return!!e}
  overrideMimeType: function (a){s||(d.mimeType=a);return this}
  pipe: function (a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&amp;&amp;f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()}
  progress: function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&amp;&amp;e!==!0&amp;&amp;(j=a,n(e[0],e[1]))}return this}
  promise: function (a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}
  readyState: 4
  setRequestHeader: function (a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this}
  state: function (){return e}
  status: 200
  statusCode: function (a){if(a){var b;if(s&lt;2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this}
  statusText: "success"
  success: function (){if(c){var a=c.length;m(arguments),i?k=c.length:e&amp;&amp;e!==!0&amp;&amp;(j=a,n(e[0],e[1]))}return this}
  then: function (a,b,c){i.done(a).fail(b).progress(c);return this}
  </code></pre>