bindingConfiguration vs bindingName

后端 未结 4 1445
逝去的感伤
逝去的感伤 2021-01-01 13:50

What exactly is the difference between bindingConfiguration and bindingName elements in a WCF endpoint element? The reason that I ask is I am creating an endpoint which use

4条回答
  •  长发绾君心
    2021-01-01 14:22

    From the MSDN documentation

    bindingConfiguration: A string that specifies the binding name of the binding to use when the endpoint is instantiated. The binding name must be in scope at the point the endpoint is defined. The default is an empty string. This attribute is used in conjunction with binding to reference a specific binding configuration in the configuration file. Set this attribute if you are attempting to use a custom binding. Otherwise, an exception may be thrown.

    bindingName: A string that specifies the unique qualified name of the binding for definition export through WSDL. The default is an empty string.

    I've never used bindingName, but it seems to only affect the WSDL generated for your endpoint. If something isn't working when you use bindingConfiguration="basicHttps", then it sounds like you have a misconfiguration that's preventing it from working correctly (if no bindingConfiguration is specified, the defaults will be applied, which is what's happening when you change bindingConfiguration to bindingName). I don't think is valid, the possible values are Basic, Certificate, Digest, Windows, or NTLM. See Transport Security Overview

提交回复
热议问题