Note that there are some explanatory texts on larger screens.

plurals
  1. POConfigure WCF to ignore authentication requirements inside IIS
    text
    copied!<p>Scenario:</p> <ol> <li>Two websites (example.com, admin.example.com) that share the same wwwroot folder.</li> <li>example.com allows only anonymous access</li> <li>admin.example.com allows only windows authentication.</li> <li>/Service/Awesome.svc returns a json object</li> </ol> <p>Accessing the Awesome service using example.com works, while admin.example.com throws a NotSupportedException; <em>"Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service."</em></p> <pre><code>&lt;system.serviceModel&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="serviceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="jsonBehavior"&gt; &lt;enableWebScript /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service name="WcfServices.AwesomeService" behaviorConfiguration="serviceBehavior"&gt; &lt;endpoint address="" binding="webHttpBinding" contract="WcfServices.IAwesomeService" behaviorConfiguration="jsonBehavior" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; </code></pre> <p>How do I configure WCF to ignore the authentication requirement? I want the same behavior as if this were a web service or handler, just execute and return the awesome json object.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload