Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>you are right, afaik in the scenario you describe wsHttpBinding requires us to use the internal WCF security stack. So what you would typically do is</p> <ul> <li>leave anonymous access enabled</li> <li>create a serviceBehavior with &lt;serviceAuthorization principalPermissionMode="UseWindowsGroups" /&gt;</li> <li>annotate every concrete implementation of a service method using the PrincipalPermissionAttribute, which is a quite powerful tool with many different options to control access</li> </ul> <p>Would that be an acceptable solution for you or are there any other things to consider?</p> <p>Basic Example:</p> <pre><code>public class TestService : ITestService { [PrincipalPermission(SecurityAction.Demand, Name = "testdomain\\administrator")] public string DoWork() { return "Hello World " + Thread.CurrentPrincipal.Identity.Name; } } &lt;system.serviceModel&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="WcfSecurity.Www.TestServiceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt; &lt;serviceAuthorization principalPermissionMode="UseWindowsGroups" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service behaviorConfiguration="WcfSecurity.Www.TestServiceBehavior" name="WcfSecurity.Www.TestService"&gt; &lt;endpoint address="" binding="wsHttpBinding" contract="WcfSecurity.Www.ITestService" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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