我有我在IIS6托管的WCF服务。我正在尝试使用传输级安全性设置自定义用户名/密码认证。我已经建立了一个测试证书,并得到了客户端通过SSL没有指定的认证,即连接:IIS6中的自定义用户名/密码身份验证
<security mode="Transport">
<transport clientCredentialType="Basic" />
</security>
我已经建立了与邮件安全和客户端凭证输入“用户名”自定义验证,但我想现在将它与运输级安全性结合起来。当我设置web.config时,当我尝试查看WSDL时,出现错误: “此服务的安全设置需要'基本'身份验证,但未启用托管此服务的IIS应用程序的身份验证。”
这里是我的web.config中的重要组成部分:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="UserNameBinding">
<security mode="Transport">
<transport clientCredentialType="Basic" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ServiceAuthenticationBehavior"
name="Service.WebServices.MyService">
<endpoint address="mex" binding="mexHttpsBinding" bindingConfiguration=""
name="mexBinding" contract="IMetadataExchange" />
<endpoint binding="wsHttpBinding" bindingConfiguration="UserNameBinding"
name="wsHttpBindingWithAuth" contract="Service.WebServices.IMyService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceAuthenticationBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<serviceCertificate findValue="TestCert01" storeLocation="LocalMachine"
storeName="TrustedPeople" x509FindType="FindBySubjectName" />
<userNameAuthentication userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="Service.WebServices.ClientCredentialsValidator, Service.WebServices" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
有什么我应该在IIS6设置,以使这个? 在IIS中,我最初启用了“启用匿名访问”选项。我也尝试启用“基本身份验证(密码以明文发送)”复选框,但没有成功。
你试图anon [关闭]和基本[在]在一起?做这样的事你不知道如果一个iisreset可以帮助,所以我做一个无论如何 – 2012-04-17 13:24:49