为什么客户端配置显示的wsHttpBinding时,我有customBinding服务器上? [英] Why client config shows wsHttpBinding when I have customBinding on server?

查看:149
本文介绍了为什么客户端配置显示的wsHttpBinding时,我有customBinding服务器上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 customBinding 在我的WCF web服务。但是,当我添加服务引用从视觉工作室2012年,在客户端显示的配置的wsHttpBinding ,如下所示:

I am using customBinding on my WCF web-service. But when I add service reference from Visual-Studio 2012, the configuration of the client shows wsHttpBinding as shown below:

<bindings>
    <wsHttpBinding>
        <binding name="CustomBinding_IService1" />
    </wsHttpBinding>
</bindings>

什么是背后的原因呢?

What is the reason behind this?

我的整个服务器的配置可以在这里找到:<一href="http://stackoverflow.com/questions/18400608/how-to-make-wcf-service-server-client-time-difference-independent">How使WCF服务的服务器 - 客户端的时间差独立?

My full server config can be found here:How to make WCF service server-client time difference independent?

推荐答案

可能是你的自定义绑定配置的方式,macthed的WsHttpBinding的能力。据 WCF绑定转换器具 R,这是自定义绑定符合WS HTTP默认设置:

Probably your custom binding is configured in a way that macthed the WSHttpBinding capabilities. According WCF Binding converter, this is the custom binding that matches ws http default settings:

<customBinding>
  <binding name="NewBinding0">
    <transactionFlow />
    <security authenticationMode="SecureConversation" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10">
      <secureConversationBootstrap authenticationMode="UserNameForSslNegotiated" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10" />
    </security>
    <textMessageEncoding />
    <httpTransport />
  </binding>
</customBinding>

(自定义的结合可能会更短一些,因为上述数值是缺省值,所以可以略过)

(your custom binding may be shorter since some of the above values are defaults so you may omit them)

现在 - 这可能与您的其他问题 - 的时滞设置不从服务器到客户端的WSDL propogate。您需要服务器和客户端上手动配置它们。

Now - and this may be related to your other question - the time skew settings do not propogate with the WSDL from the server to the client. You need to manually configure them on both server and client.

这篇关于为什么客户端配置显示的wsHttpBinding时,我有customBinding服务器上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆