2009-01-22 44 views
3

這裏是我的WCF服務我的web.config的一部分:WCF安全模式是使用UserName的TransportWithMessageCredential,在哪裏驗證?

<bindings> 
     <basicHttpBinding> 
     <binding name="sslBinding"> 
      <security mode="TransportWithMessageCredential"> 
      <message clientCredentialType="UserName" algorithmSuite="Default" /> 
      <transport /> 
      </security> 
     </binding> 
     </basicHttpBinding> 
    </bindings> 

確切位置在哪裏我檢查用戶名當客戶端嘗試消耗我的服務?是否有一些方法我必須重寫以驗證用戶名?

回答

6
<behaviors> 
     <serviceBehaviors> 
      <behavior name="behavior"> 
      <serviceCredentials> 
       <userNameAuthentication customUserNamePasswordValidatorType="myType, assembly" userNamePasswordValidationMode="Custom"/> 
      </serviceCredentials> 
      </behavior> 
     </serviceBehaviors> 
相關問題