Note that there are some explanatory texts on larger screens.

plurals
  1. POIIS hosted WCF-service + Windows auth in IIS + TransportCredentialOnly/Windows auth in basicHttpBinding
    primarykey
    data
    text
    <p>I want to create a WCF-service hosted in IIS6 and disable anonymous authentication in IIS. And don't use SSL.</p> <p>So only way I have is to use basicHttpBinging with <code>TransportCredentialOnly</code>, itsn't it?</p> <p>I create a virtual directory, set Windows Integrated Auth and uncheck "Enable Anonymous Access".</p> <p>Here's my web.config:</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="MyBinding"&gt; &lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service name="Samples.ServiceFacadeService" behaviorConfiguration="ServiceFacadeServiceBehavior"&gt; &lt;endpoint address="" binding="basicHttpBinding" bindingName="MyBinding" contract="Samples.IServiceFacadeService"&gt; &lt;/endpoint&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="ServiceFacadeServiceBehavior"&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p>You can see that I even haven't included MEX-enpoint for metadata exchange. Just one endpoint and one binding for it with TransportCredentialOnly security.</p> <p>But when I tries to start service (invoking a method throught client proxy) I got such exception in the EventLog:</p> <blockquote> <p>Exception: System.ServiceModel.ServiceActivationException: The service '/wcftest/ServiceFacadeService.svc' cannot be activated due to an exception during compilation. The exception message is: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.. ---> System.NotSupportedException: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.</p> </blockquote> <p>I have no idea why my service require Anonymous auth? Why?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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