WebHttpBehavior WebHttpBehavior WebHttpBehavior WebHttpBehavior Class

定义

为 Windows Communication Foundation (WCF) 服务启用 Web 编程模型。Enables the Web programming model for a Windows Communication Foundation (WCF) service.

public ref class WebHttpBehavior : System::ServiceModel::Description::IEndpointBehavior
public class WebHttpBehavior : System.ServiceModel.Description.IEndpointBehavior
type WebHttpBehavior = class
    interface IEndpointBehavior
Public Class WebHttpBehavior
Implements IEndpointBehavior
继承
WebHttpBehaviorWebHttpBehaviorWebHttpBehaviorWebHttpBehavior
派生
实现

注解

WebHttpBehavior结合使用时的行为WebHttpBinding绑定,使 WCF 公开和访问 Web 样式服务。The WebHttpBehavior behavior, when used in conjunction with the WebHttpBinding binding, enables WCF to expose and access Web style services. WebServiceHost 自动将此行为添加到使用的终结点WebHttpBindingWebServiceHost automatically adds this behavior to endpoints that use the WebHttpBinding.

构造函数

WebHttpBehavior() WebHttpBehavior() WebHttpBehavior() WebHttpBehavior()

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

属性

AutomaticFormatSelectionEnabled AutomaticFormatSelectionEnabled AutomaticFormatSelectionEnabled AutomaticFormatSelectionEnabled

获取或设置一个值,该值确定是否启用自动格式选择。Gets or sets a value that determines if automatic format selection is enabled.

DefaultBodyStyle DefaultBodyStyle DefaultBodyStyle DefaultBodyStyle

获取或设置默认消息正文样式。Gets or sets the default message body style.

DefaultOutgoingRequestFormat DefaultOutgoingRequestFormat DefaultOutgoingRequestFormat DefaultOutgoingRequestFormat

获取或设置默认传出请求格式。Gets or sets the default outgoing request format.

DefaultOutgoingResponseFormat DefaultOutgoingResponseFormat DefaultOutgoingResponseFormat DefaultOutgoingResponseFormat

获取或设置默认传出响应格式。Gets or sets the default outgoing response format.

FaultExceptionEnabled FaultExceptionEnabled FaultExceptionEnabled FaultExceptionEnabled

获取或设置用于指定在发生内部服务器错误(HTTP 状态代码:500)时是否生成 FaultException 的标志。Gets or sets the flag that specifies whether a FaultException is generated when an internal server error (HTTP status code: 500) occurs.

HelpEnabled HelpEnabled HelpEnabled HelpEnabled

获取或设置一个值,该值确定是否启用了 WCF 帮助页。Gets or sets a value that determines if the WCF Help page is enabled.

JavascriptCallbackParameterName JavascriptCallbackParameterName JavascriptCallbackParameterName JavascriptCallbackParameterName

获取或设置 JavaScript 回调参数名称。Gets or sets the JavaScript callback parameter name.

方法

AddBindingParameters(ServiceEndpoint, BindingParameterCollection) AddBindingParameters(ServiceEndpoint, BindingParameterCollection) AddBindingParameters(ServiceEndpoint, BindingParameterCollection) AddBindingParameters(ServiceEndpoint, BindingParameterCollection)

实现 AddBindingParameters(ServiceEndpoint, BindingParameterCollection) 方法可将运行时处的数据传递给绑定以支持自定义行为。Implements the AddBindingParameters(ServiceEndpoint, BindingParameterCollection) method to pass data at runtime to bindings to support custom behavior.

AddClientErrorInspector(ServiceEndpoint, ClientRuntime) AddClientErrorInspector(ServiceEndpoint, ClientRuntime) AddClientErrorInspector(ServiceEndpoint, ClientRuntime) AddClientErrorInspector(ServiceEndpoint, ClientRuntime)

将客户端错误检查器添加到指定的服务终结点。Adds a client error inspector to the specified service endpoint.

AddServerErrorHandlers(ServiceEndpoint, EndpointDispatcher) AddServerErrorHandlers(ServiceEndpoint, EndpointDispatcher) AddServerErrorHandlers(ServiceEndpoint, EndpointDispatcher) AddServerErrorHandlers(ServiceEndpoint, EndpointDispatcher)

重写此方法,以更改服务上发生的错误的处理方式。Override this method to change the way errors that occur on the service are handled.

ApplyClientBehavior(ServiceEndpoint, ClientRuntime) ApplyClientBehavior(ServiceEndpoint, ClientRuntime) ApplyClientBehavior(ServiceEndpoint, ClientRuntime) ApplyClientBehavior(ServiceEndpoint, ClientRuntime)

实现 ApplyClientBehavior(ServiceEndpoint, ClientRuntime) 方法可支持对终结点上的客户端进行修改或扩展。Implements the ApplyClientBehavior(ServiceEndpoint, ClientRuntime) method to support modification or extension of the client across an endpoint.

ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher) ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher) ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher) ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher)

实现 ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher) 方法可支持对终结点上的客户端进行修改或扩展。Implements the ApplyDispatchBehavior(ServiceEndpoint, EndpointDispatcher) method to support modification or extension of the client across an endpoint.

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)
GetOperationSelector(ServiceEndpoint) GetOperationSelector(ServiceEndpoint) GetOperationSelector(ServiceEndpoint) GetOperationSelector(ServiceEndpoint)

创建一个新的 WebHttpDispatchOperationSelector 对象。Creates a new WebHttpDispatchOperationSelector object.

GetQueryStringConverter(OperationDescription) GetQueryStringConverter(OperationDescription) GetQueryStringConverter(OperationDescription) GetQueryStringConverter(OperationDescription)

获取查询字符串转换器。Gets the query string converter.

GetReplyClientFormatter(OperationDescription, ServiceEndpoint) GetReplyClientFormatter(OperationDescription, ServiceEndpoint) GetReplyClientFormatter(OperationDescription, ServiceEndpoint) GetReplyClientFormatter(OperationDescription, ServiceEndpoint)

获取指定终结点和服务操作的客户端上的答复格式化程序。Gets the reply formatter on the client for the specified endpoint and service operation.

GetReplyDispatchFormatter(OperationDescription, ServiceEndpoint) GetReplyDispatchFormatter(OperationDescription, ServiceEndpoint) GetReplyDispatchFormatter(OperationDescription, ServiceEndpoint) GetReplyDispatchFormatter(OperationDescription, ServiceEndpoint)

获取指定终结点和服务操作的服务上的答复格式化程序。Gets the reply formatter on the service for the specified endpoint and service operation.

GetRequestClientFormatter(OperationDescription, ServiceEndpoint) GetRequestClientFormatter(OperationDescription, ServiceEndpoint) GetRequestClientFormatter(OperationDescription, ServiceEndpoint) GetRequestClientFormatter(OperationDescription, ServiceEndpoint)

获取指定服务操作和终结点的客户端上的请求格式化程序。Gets the request formatter on the client for the specified service operation and endpoint.

GetRequestDispatchFormatter(OperationDescription, ServiceEndpoint) GetRequestDispatchFormatter(OperationDescription, ServiceEndpoint) GetRequestDispatchFormatter(OperationDescription, ServiceEndpoint) GetRequestDispatchFormatter(OperationDescription, ServiceEndpoint)

获取给定服务操作和服务终结点的服务上的请求格式化程序。Gets the request formatter on the service for the given service operation and service endpoint.

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)
ToString() ToString() ToString() ToString()

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

(Inherited from Object)
Validate(ServiceEndpoint) Validate(ServiceEndpoint) Validate(ServiceEndpoint) Validate(ServiceEndpoint)

确认终结点符合 Web 编程模型的请求。Confirms that the endpoint meets the requirements for the Web programming model.

ValidateBinding(ServiceEndpoint) ValidateBinding(ServiceEndpoint) ValidateBinding(ServiceEndpoint) ValidateBinding(ServiceEndpoint)

确保绑定在与 WCF Web 编程模型一起使用时有效。Ensures the binding is valid for use with the WCF Web Programming Model.

ValidateOperation(OperationDescription) ValidateOperation(OperationDescription) ValidateOperation(OperationDescription) ValidateOperation(OperationDescription)

显式界面实现

IWmiInstanceProvider.FillInstance(IWmiInstance) IWmiInstanceProvider.FillInstance(IWmiInstance) IWmiInstanceProvider.FillInstance(IWmiInstance) IWmiInstanceProvider.FillInstance(IWmiInstance)
IWmiInstanceProvider.GetInstanceType() IWmiInstanceProvider.GetInstanceType() IWmiInstanceProvider.GetInstanceType() IWmiInstanceProvider.GetInstanceType()

适用于