Web services 使用windows身份验证设置安全SSL、WCF
好的,我真的需要你帮我安装。目前我已安装ssl证书。我在iis中安装了一个wcf服务作为应用程序。我已将其设置为需要ssl,并且我能够连接到该服务。问题是我需要windows身份验证。我想禁用匿名安全性。一旦我禁用匿名并保持windows身份验证。我得到一个错误: “主机上配置的身份验证方案('IntegratedWindowsAuthentication')不允许在绑定'BasicHttpBinding'('Anonymous')上配置的身份验证方案。请确保SecurityMode设置为Transport或TransportCredentialOnly.etc…” 当我使用windows身份验证重新启用匿名时。是的,我可以访问该服务,但它不使用windows身份验证。。这很奇怪,因为其他文件,例如test.html,仍然需要用户名/密码。我不知道如何使用ssl正确限制windows身份验证的Web服务。。。有人能帮我吗??请Web services 使用windows身份验证设置安全SSL、WCF,web-services,wcf,authentication,ssl,Web Services,Wcf,Authentication,Ssl,好的,我真的需要你帮我安装。目前我已安装ssl证书。我在iis中安装了一个wcf服务作为应用程序。我已将其设置为需要ssl,并且我能够连接到该服务。问题是我需要windows身份验证。我想禁用匿名安全性。一旦我禁用匿名并保持windows身份验证。我得到一个错误: “主机上配置的身份验证方案('IntegratedWindowsAuthentication')不允许在绑定'BasicHttpBinding'('Anonymous')上配置的身份验证方案。请确保SecurityMode设置为Tra
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.0" />
<customErrors mode="Off"/>
</system.web>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="WcfConcur.ConcurService">
<endpoint address=""
binding="wsHttpBinding"
bindingConfiguration="TransportSecurity"
contract="WcfConcur.IConcurService"/>
<endpoint address="mex"
binding="mexHttpsBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpsGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
在客户端,我添加了对wcf的引用。它会自动下载。问题是我的初始wcf地址是托管的,当它下载时会显示地址,我不知道这是否是问题所在
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
<system.serviceModel>
<client>
<endpoint address="http://internal address/wcfConcurService/ConcurService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IConcurService"
contract="wcfConcurRef.IConcurService" name="BasicHttpBinding_IConcurService" />
</client>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IConcurService" />
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
禁用匿名访问时抛出的错误消息似乎表明客户端配置存在问题 客户端配置似乎正在使用
basichttppbinding
,这与使用wsHttpBinding
的服务器配置不同。要解决绑定问题,应将服务器绑定配置复制到客户端配置文件,然后更新客户端端点以使用新的绑定配置
您的客户端配置应类似于:
<system.serviceModel>
<client>
<endpoint address="https://enter-external-address-here/wcfConcurService/ConcurService.svc"
binding="wsHttpBinding" bindingConfiguration="TransportSecurity"
contract="wcfConcurRef.IConcurService" name="BasicHttpBinding_IConcurService" />
</client>
<bindings>
<wsHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
我还收到一条消息,没有端点可以接受消息。这通常是由不正确的地址或SOAP操作引起的。有关更多详细信息,请参阅InnerException(如果存在)。。由于某些原因,客户端配置上的地址具有http://内部地址,而不是外部地址。我该如何解决这个问题?也许您可以包含客户端配置文件的相关部分以供审阅。更新的答案。。。似乎您需要对齐客户端/服务器绑定,然后输入正确的外部IP地址和端口请参阅。。。我仍然会收到一个错误,即在更改客户端后,它没有在端点侦听。即使我更改了客户端,它仍然无法识别服务正在侦听。因为刷新服务时,它总是显示“内部”地址。如果我再次覆盖它,它仍然不想工作