我在另一臺機器上部署了WCF服務,我想根據WCF服務對客戶端進行身份驗證。WCF服務中的身份驗證
我也做了以下幾件事:
1)在IIS我已經取消選中了匿名訪問,並檢查了「集成Windows Authenfication」複選框。
2)我的Web配置
<authentication mode="Windows" />
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBind">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" proxyCredentialType="Ntlm" />
</security>
</binding>
</basicHttpBinding>
</bindings>
3)在客戶端,我傳遞如下用戶憑據:
MyServiceClient _client;
_client = new MyServiceClient();
_client.ClientCredentials.Windows.ClientCredential.UserName = "username";
_client.ClientCredentials.Windows.ClientCredential.Password = "password";
_client.ClientCredentials.Windows.ClientCredential.Domain = "mydomain";
我的問題是怎樣可以捕獲用戶名和密碼在服務器端(服務部署的地方)?
我如何可以驗證對用戶憑據傳遞?
目前我使用basichttp結合..這是結合不夠好,支持安全模式?
Hi Marc, 感謝您的回覆。 我想要安全模型,要求用戶在Windows域中擁有帳戶。 – 2009-08-31 07:13:01
當前示例需要使用SQL Server數據庫來存儲用戶信息,但我不希望這樣,我想根據活動目錄驗證用戶。如果它存在於當前域中或不存在。如果用戶存在,然後在哪個組..等 – 2009-08-31 07:18:58
更新,以顯示如何使用AD授權 – 2009-08-31 07:52:39