CORS endpoints on asp.net Webforms [WebMethod] endpoints : <p>I am trying to add some <code>[WebMethod]</code> annotated endpoint functions to a Webforms style web app (.aspx and .asmx). </p>

<p>I'd like to annotate those endpoints with <code>[EnableCors]</code> and thereby get all the good ajax-preflight functionality.</p>

<p>VS2013 accepts the annotation, but still the endpoints don't play nice with CORS. (They work fine when used same-origin but not cross-origin).</p>

<p>I can't even get them to function cross-origin with the down and dirty</p>

<pre><code>HttpContext.Current.Response.AppendHeader("Access-Control-Allow-Origin", "*");
</code></pre>

<p>approach -- my browsers reject the responses, and the cross-origin response headers don't appear.</p>

<p>How can I get CORS functionality in these <code>[WebMethod]</code> endpoints?</p>
