【发布时间】:2010-12-09 16:01:17
【问题描述】:
我是使用 WCF 的新手,需要一些帮助来配置简单 WCF 4.0 服务的安全性。我想允许一个特定的域用户帐户能够访问该服务而没有其他人。我已经看到了一些示例代码,其中帐户凭据是通过调用服务的客户端应用程序中的代理发送的,如下所示: proxy.ClientCredentials.Windows.ClientCredential.UserName = "我的用户名"; proxy.ClientCredentials.Windows.ClientCredential.Password = "我的密码"; 但我不知道如何在我的服务中配置端点以接受该用户作为唯一有权使用该服务的用户。这是我的端点的代码:
<endpoint address="" binding="wsHttpBinding" bindingConfiguration=""
contract="EvalServiceLibrary.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
【问题讨论】:
-
您使用的是 Windows 身份验证吗?