WCF问题-公开服务
我们需要以下类型的服务:WCF问题-公开服务,wcf,wcf-security,Wcf,Wcf Security,我们需要以下类型的服务: 公开提供。使用X509证书对用户进行身份验证 内部的。被我们的网站消费。用户在网站上经过身份验证,用户名传递给服务 公开提供。用户根据与其IP地址匹配的传入令牌进行身份验证(我们需要支持传统功能) 现在,我通过在WCF服务项目中创建SVC文件实现了#1。这些在配置文件中配置。我没有在该部分中指定任何内容,而且SVC文件似乎使用默认绑定(没有name属性的绑定)。这听起来对吗 如果要实现其他类型的服务,我需要在web.config的部分中指定服务并将它们指向其特定的绑定/
<system.serviceModel>
<services configSource="services.config" />
<behaviors configSource="behavior.config" />
<bindings>
<wsHttpBinding>
<binding name="Http" receiveTimeout="00:10:00">
<security mode="None">
<transport clientCredentialType="None" />
<message clientCredentialType="None" establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<!-- rest of WCF elements inline as in the bindings element or in other files -->
</system.serviceModel>
您只需要创建每个引用的文件。这是一种将特定于环境(即Dev、QA、Staging、Prod)的设置放在单独文件中的好方法,这样您就可以参数化部署脚本