WSFederationHttpBinding WSFederationHttpBinding WSFederationHttpBinding WSFederationHttpBinding Class

定义

支持联合安全的可互操作的安全绑定。A secure and interoperable binding that supports federated security.

public ref class WSFederationHttpBinding : System::ServiceModel::WSHttpBindingBase
public class WSFederationHttpBinding : System.ServiceModel.WSHttpBindingBase
type WSFederationHttpBinding = class
    inherit WSHttpBindingBase
Public Class WSFederationHttpBinding
Inherits WSHttpBindingBase
继承
WSFederationHttpBindingWSFederationHttpBindingWSFederationHttpBindingWSFederationHttpBinding
派生

注解

联合是一种可以在多个系统通过共享标识进行身份验证和授权的功能。Federation is the ability to share identities across multiple systems for authentication and authorization. 这些标识可以指用户,也可以指计算机。These identities can refer to users or to machines. 联合 HTTP 支持 SOAP 安全以及混合模式安全,但不支持以独占方式使用传输安全。Federated HTTP supports SOAP security as well as mixed-mode security, but it does not support exclusively using transport security. 此绑定提供对 WS-联合身份验证协议的 Windows Communication Foundation (WCF) 支持。This binding provides Windows Communication Foundation (WCF) support for the WS-Federation protocol. 配置了此绑定的服务必须使用 HTTP 传输。Services configured with this binding must use the HTTP transport.

绑定由绑定元素堆栈组成。Bindings consist of a stack of binding elements. WSFederationHttpBinding 设置为 WSHttpBinding 的默认值时,Security 中的绑定元素堆栈与 Message 中包含的堆栈相同。The stack of binding elements in WSFederationHttpBinding is the same as that contained in WSHttpBinding when Security is set to the default value of Message.

WSFederationHttpBinding 控制消息安全设置的详细设置,这些值可通过 FederatedMessageSecurityOverHttp 属性返回的 Message 实例获得。The WSFederationHttpBinding controls the details of the message security settings, the values of which are available from the instance of FederatedMessageSecurityOverHttp that is returned by the Message property.

WSFederationHttpBinding 还提供 PrivacyNoticeAt 属性,用于设置和检索隐私声明所在的 URI。The WSFederationHttpBinding also provides a PrivacyNoticeAt property to set and retrieve the URI at which the privacy notice is located.

备注

当调用 WCF 服务生成使用.NET Framework 4.0 或更高版本从 WCF 客户端应用程序使用.NET Framework 3.5 或更早版本,构建由 svcutil.exe 生成的配置文件或添加服务引用从 Visual Studio 包含establishSecurityContext在绑定配置的属性。When calling a WCF service built with .NET Framework 4.0 or later from a WCF client application built with .NET Framework 3.5 or earlier, the configuration file generated by svcutil.exe or adding a service reference from Visual Studio contains the establishSecurityContext attribute in the binding configuration. .NET Framework 3.5.NET Framework 3.5 运行时无法识别此特性,应用程序将引发 ConfigurationErrorsException 并显示消息“无法识别的特性 establishSecurityContext”。This attribute is not recognized by the .NET Framework 3.5.NET Framework 3.5 runtime and the application throws an ConfigurationErrorsException with the message "Unrecognized attribute establishSecurityContext ". 解决此问题,请删除establishSecurityContext从绑定配置的属性。To workaround this problem, remove the establishSecurityContext attribute from the binding configuration.

构造函数

WSFederationHttpBinding() WSFederationHttpBinding() WSFederationHttpBinding() WSFederationHttpBinding()

初始化 WSFederationHttpBinding 类的新实例。Initializes a new instance of the WSFederationHttpBinding class.

WSFederationHttpBinding(String) WSFederationHttpBinding(String) WSFederationHttpBinding(String) WSFederationHttpBinding(String)

使用由配置名称指定的绑定初始化 WSFederationHttpBinding 类的新实例。Initializes a new instance of the WSFederationHttpBinding class with a binding specified by its configuration name.

WSFederationHttpBinding(WSFederationHttpSecurityMode) WSFederationHttpBinding(WSFederationHttpSecurityMode) WSFederationHttpBinding(WSFederationHttpSecurityMode) WSFederationHttpBinding(WSFederationHttpSecurityMode)

通过绑定所使用的指定安全性类型初始化 WSFederationHttpBinding 类的新实例。Initializes a new instance of the WSFederationHttpBinding class with a specified type of security used by the binding.

WSFederationHttpBinding(WSFederationHttpSecurityMode, Boolean) WSFederationHttpBinding(WSFederationHttpSecurityMode, Boolean) WSFederationHttpBinding(WSFederationHttpSecurityMode, Boolean) WSFederationHttpBinding(WSFederationHttpSecurityMode, Boolean)

通过绑定所使用的指定安全类型以及一个指示是否启用可靠会话的值来初始化 WSFederationHttpBinding 类的新实例。Initializes a new instance of the WSFederationHttpBinding class with a specified type of security used by the binding and a value that indicates whether a reliable session is enabled.

属性

BypassProxyOnLocal BypassProxyOnLocal BypassProxyOnLocal BypassProxyOnLocal

获取或设置一个值,该值指示是否对本地地址不使用代理服务器。Gets or sets a value that indicates whether to bypass the proxy server for local addresses.

(Inherited from WSHttpBindingBase)
CloseTimeout CloseTimeout CloseTimeout CloseTimeout

获取或设置在传输引发异常之前可用于关闭连接的时间间隔。Gets or sets the interval of time provided for a connection to close before the transport raises an exception.

(Inherited from Binding)
EnvelopeVersion EnvelopeVersion EnvelopeVersion EnvelopeVersion

获取此绑定处理的消息将要使用的 SOAP 版本。Gets the version of SOAP that is used for messages that are processed by this binding.

(Inherited from WSHttpBindingBase)
HostNameComparisonMode HostNameComparisonMode HostNameComparisonMode HostNameComparisonMode

获取或设置一个值,该值指示在对 URI 进行匹配时,是否使用主机名来访问服务。Gets or sets a value that indicates whether the hostname is used to reach the service when matching the URI.

(Inherited from WSHttpBindingBase)
IBindingRuntimePreferences.ReceiveSynchronously IBindingRuntimePreferences.ReceiveSynchronously IBindingRuntimePreferences.ReceiveSynchronously IBindingRuntimePreferences.ReceiveSynchronously

获取一个值,该值指示是同步处理传入请求还是异步处理传入请求。Gets a value that indicates whether incoming requests are handled synchronously or asynchronously.

(Inherited from WSHttpBindingBase)
MaxBufferPoolSize MaxBufferPoolSize MaxBufferPoolSize MaxBufferPoolSize

获取或设置可为缓冲区管理器分配的最大内存量(以字节为单位),该管理器管理使用此绑定的终结点所需的缓冲区。Gets or sets the maximum amount of memory allocated, in bytes, for the buffer manager that manages the buffers required by endpoints using this binding.

(Inherited from WSHttpBindingBase)
MaxReceivedMessageSize MaxReceivedMessageSize MaxReceivedMessageSize MaxReceivedMessageSize

获取或设置绑定可处理的消息的最大大小(以字节为单位)。Gets or sets the maximum size, in bytes, for a message that can be processed by the binding.

(Inherited from WSHttpBindingBase)
MessageEncoding MessageEncoding MessageEncoding MessageEncoding

获取或设置一个值,该值指示是使用 MTOM 还是文本/XML 对 SOAP 消息进行编码。Gets or sets whether MTOM or Text/XML is used to encode SOAP messages.

(Inherited from WSHttpBindingBase)
MessageVersion MessageVersion MessageVersion MessageVersion

获取由绑定所配置的客户端和服务使用的消息版本。Gets the message version used by clients and services configured with the binding.

(Inherited from Binding)
Name Name Name Name

获取或设置绑定的名称。Gets or sets the name of the binding.

(Inherited from Binding)
Namespace Namespace Namespace Namespace

获取或设置绑定的 XML 命名空间。Gets or sets the XML namespace of the binding.

(Inherited from Binding)
OpenTimeout OpenTimeout OpenTimeout OpenTimeout

获取或设置在传输引发异常之前可用于打开连接的时间间隔。Gets or sets the interval of time provided for a connection to open before the transport raises an exception.

(Inherited from Binding)
PrivacyNoticeAt PrivacyNoticeAt PrivacyNoticeAt PrivacyNoticeAt

获取或设置隐私声明所在的 URI。Gets or sets the URI at which the privacy notice is located.

PrivacyNoticeVersion PrivacyNoticeVersion PrivacyNoticeVersion PrivacyNoticeVersion

获取或设置绑定的隐私声明版本号。Gets or sets the privacy notice version number for the binding.

ProxyAddress ProxyAddress ProxyAddress ProxyAddress

获取或设置 HTTP 代理的 URI 地址。Gets or sets the URI address of the HTTP proxy.

(Inherited from WSHttpBindingBase)
ReaderQuotas ReaderQuotas ReaderQuotas ReaderQuotas

获取或设置可由配置了此绑定的终结点处理的 SOAP 消息的复杂性约束。Gets or sets constraints on the complexity of SOAP messages that can be processed by endpoints configured with this binding.

(Inherited from WSHttpBindingBase)
ReceiveTimeout ReceiveTimeout ReceiveTimeout ReceiveTimeout

获取或设置连接在撤消之前保持非活动状态的最大时间间隔,在此时间间隔内未接收任何应用程序消息。Gets or sets the interval of time that a connection can remain inactive, during which no application messages are received, before it is dropped.

(Inherited from Binding)
ReliableSession ReliableSession ReliableSession ReliableSession

获取一个对象,当使用系统提供的一个绑定时,该对象可提供对可用的可靠会话绑定元素属性的便捷访问。Gets an object that provides convenient access to the properties of a reliable session binding element that are available when using one of the system-provided bindings.

(Inherited from WSHttpBindingBase)
Scheme Scheme Scheme Scheme

获取用此绑定配置的通道和侦听器的 URI 传输方案。Gets the URI transport scheme for the channels and listeners that are configured with this binding.

(Inherited from WSHttpBindingBase)
Security Security Security Security

获取或设置用于此绑定的安全类型。Gets or sets the type of security used with this binding.

SendTimeout SendTimeout SendTimeout SendTimeout

获取或设置在传输引发异常之前可用于完成写入操作的时间间隔。Gets or sets the interval of time provided for a write operation to complete before the transport raises an exception.

(Inherited from Binding)
TextEncoding TextEncoding TextEncoding TextEncoding

获取或设置用于消息文本的字符编码。Gets or sets the character encoding that is used for the message text.

(Inherited from WSHttpBindingBase)
TransactionFlow TransactionFlow TransactionFlow TransactionFlow

获取或设置一个值,该值指示此绑定是否应支持流动 WS-Transactions。Gets or sets a value that indicates whether this binding should support flowing WS-Transactions.

(Inherited from WSHttpBindingBase)
UseDefaultWebProxy UseDefaultWebProxy UseDefaultWebProxy UseDefaultWebProxy

获取或设置一个值,该值指示是否应使用系统的自动配置 HTTP 代理(如果可用)。Gets or sets a value that indicates whether the auto-configured HTTP proxy of the system should be used, if available.

(Inherited from WSHttpBindingBase)

方法

BuildChannelFactory<TChannel>(BindingParameterCollection) BuildChannelFactory<TChannel>(BindingParameterCollection) BuildChannelFactory<TChannel>(BindingParameterCollection) BuildChannelFactory<TChannel>(BindingParameterCollection)

在客户端上生成通道工厂堆栈,此通道工厂堆栈创建具有指定类型的通道并满足绑定参数集合所指定的功能。Builds the channel factory stack on the client that creates a specified type of channel and that satisfies the features specified by a collection of binding parameters.

(Inherited from Binding)
BuildChannelFactory<TChannel>(Object[]) BuildChannelFactory<TChannel>(Object[]) BuildChannelFactory<TChannel>(Object[]) BuildChannelFactory<TChannel>(Object[])

在客户端上生成通道工厂堆栈,该通道工厂堆栈创建具有指定类型的通道并满足对象数组所指定的功能。Builds the channel factory stack on the client that creates a specified type of channel and that satisfies the features specified by an object array.

(Inherited from Binding)
BuildChannelListener<TChannel>(BindingParameterCollection) BuildChannelListener<TChannel>(BindingParameterCollection) BuildChannelListener<TChannel>(BindingParameterCollection) BuildChannelListener<TChannel>(BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足绑定参数集合所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified by a collection of binding parameters.

(Inherited from Binding)
BuildChannelListener<TChannel>(Object[]) BuildChannelListener<TChannel>(Object[]) BuildChannelListener<TChannel>(Object[]) BuildChannelListener<TChannel>(Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, Object[]) BuildChannelListener<TChannel>(Uri, Object[]) BuildChannelListener<TChannel>(Uri, Object[]) BuildChannelListener<TChannel>(Uri, Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[]) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[]) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[]) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, Object[]) BuildChannelListener<TChannel>(Uri, String, Object[]) BuildChannelListener<TChannel>(Uri, String, Object[]) BuildChannelListener<TChannel>(Uri, String, Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在客户端上生成满足指定绑定参数集合的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the collection of binding parameters specified.

(Inherited from Binding)
CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在客户端上生成满足对象数组所指定的需求的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the requirements specified by an object array.

(Inherited from Binding)
CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在服务上生成满足指定绑定参数集合的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the collection of binding parameters specified.

(Inherited from Binding)
CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在服务上生成满足对象数组所指定的条件的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the criteria specified in an array of objects.

(Inherited from Binding)
CreateBindingElements() CreateBindingElements() CreateBindingElements() CreateBindingElements()

为绑定创建一个绑定元素集合。Creates a collection with the binding elements for the binding.

CreateMessageSecurity() CreateMessageSecurity() CreateMessageSecurity() CreateMessageSecurity()

创建一个已启用可靠会话的 SecurityBindingElementCreates a SecurityBindingElement that has enabled a reliable session.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetProperty<T>(BindingParameterCollection) GetProperty<T>(BindingParameterCollection) GetProperty<T>(BindingParameterCollection) GetProperty<T>(BindingParameterCollection)

从绑定堆栈的适当层返回所请求的类型化对象(如果存在)。Returns a typed object requested, if present, from the appropriate layer in the binding stack.

(Inherited from Binding)
GetTransport() GetTransport() GetTransport() GetTransport()

返回来自于当前绑定的传输绑定元素。Returns the transport binding element from the current binding.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ShouldSerializeName() ShouldSerializeName() ShouldSerializeName() ShouldSerializeName()

返回是否应序列化绑定名称。Returns whether the name of the binding should be serialized.

(Inherited from Binding)
ShouldSerializeNamespace() ShouldSerializeNamespace() ShouldSerializeNamespace() ShouldSerializeNamespace()

返回是否应序列化绑定命名空间。Returns whether the namespace of the binding should be serialized.

(Inherited from Binding)
ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas()

返回一个值,该值指示 ReaderQuotas 属性是否已更改,不再是默认值且应对其进行序列化。Returns a value that indicates whether the ReaderQuotas property has changed from its default value and should be serialized.

(Inherited from WSHttpBindingBase)
ShouldSerializeReliableSession() ShouldSerializeReliableSession() ShouldSerializeReliableSession() ShouldSerializeReliableSession()

返回一个值,该值指示 ReliableSession 属性是否已更改,不再是默认值且应对其进行序列化。Returns a value that indicates whether the ReliableSession property has changed from its default value and should be serialized.

(Inherited from WSHttpBindingBase)
ShouldSerializeSecurity() ShouldSerializeSecurity() ShouldSerializeSecurity() ShouldSerializeSecurity()

返回一个值,该值指示 Security 属性是否已更改,不再是默认值且应对其进行序列化。Returns a value that indicates whether the Security property has changed from its default value and should be serialized.

ShouldSerializeTextEncoding() ShouldSerializeTextEncoding() ShouldSerializeTextEncoding() ShouldSerializeTextEncoding()

返回一个值,该值指示 TextEncoding 属性是否已更改,不再是默认值且应对其进行序列化。Returns a value that indicates whether the TextEncoding property has changed from its default value and should be serialized.

(Inherited from WSHttpBindingBase)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

适用于