編輯

共用方式為


ServiceHealthBehavior.HandleHealthRequest Method

Definition

Returns the response message to a specified request.

public:
 override void HandleHealthRequest(System::ServiceModel::ServiceHostBase ^ serviceHost, System::ServiceModel::Channels::Message ^ httpGetRequest, cli::array <System::String ^> ^ queries, [Runtime::InteropServices::Out] System::ServiceModel::Channels::Message ^ % replyMessage);
public override void HandleHealthRequest (System.ServiceModel.ServiceHostBase serviceHost, System.ServiceModel.Channels.Message httpGetRequest, string[] queries, out System.ServiceModel.Channels.Message replyMessage);
override this.HandleHealthRequest : System.ServiceModel.ServiceHostBase * System.ServiceModel.Channels.Message * string[] * Message -> unit
Public Overrides Sub HandleHealthRequest (serviceHost As ServiceHostBase, httpGetRequest As Message, queries As String(), ByRef replyMessage As Message)

Parameters

serviceHost
ServiceHostBase

An instance of the service host that contains the WCF service with the ServiceHealthBehavior enabled.

httpGetRequest
Message

The HTTP request made to the health endpoint.

queries
String[]

An array containing the field/value pairs of the query string.

replyMessage
Message

When the method returns, the response message of the health behavior. This message has a content type of text/html or text/xml , depending on whether the request was for XML or HTML.

Exceptions

serviceHost is null.

-or-

httpGetRequest is null

-or-

queries is null.

Remarks

This method is invoked by the ServiceHealthBehaviorBase instance and is responsible for crafting the response message to the health endpoint.

Applies to