title: Could not add Access-Control-Allow-Origin to my WCF library Project
body: <p>I'm trying to understand why this ajax called doesn't work</p>
  
  <pre><code> $.ajax({
          type: 'GET',
          url: "http://localhost:8732/Design_Time_Addresses/InMotionGIT_NT.Address.Service/AddressService/json/capitalize",
          data: { streetAddress : JSON.stringify(streetAddress) , consumer :  JSON.stringify(consumer)} ,
          datatype: "jsonp",
          success: function (data) {
              $('body').append('&lt;div&gt;'+data.IDblah+' '+ data.prueba+'&lt;/div&gt;');
              alert(data.IDblah);
          }
  </code></pre>
  
  <p>The service receive the data is correctly received and the response it's correct. Why am I doing wrong?</p>
  
  <p>I tried adding this property to the ajax called but without success <code>crossDomain : true</code></p>
  
  <pre><code>[OperationContract()]
  [WebInvoke(Method="GET", RequestFormat=WebMessageFormat.Json, ResponseFormat=WebMessageFormat.Json)]
  public string Capitalize(StreetAddress streetAddress,ConsumerInformation consumer)
  </code></pre>
  
  <p>The error that i'm getting it's the common </p>
  
  <pre><code> XMLHttpRequest cannot load Origin http://localhost:50816 is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried to add the header to the response by adding the configuracion in my <code>App.config</code> file but without success</p>
  
  <pre><code>&lt;system.webServer&gt;
  &lt;httpProtocol&gt;
    &lt;customHeaders&gt;
      &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
    &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;
  &lt;/system.webServer&gt;
  </code></pre>