共用方式為


ServiceHealthBehavior.AddHttpProperty 方法

定義

設定回應訊息的內容類型和 HTTP 狀態碼。

protected:
 static void AddHttpProperty(System::ServiceModel::Channels::Message ^ message, System::Net::HttpStatusCode status, bool isXml);
protected static void AddHttpProperty (System.ServiceModel.Channels.Message message, System.Net.HttpStatusCode status, bool isXml);
static member AddHttpProperty : System.ServiceModel.Channels.Message * System.Net.HttpStatusCode * bool -> unit
Protected Shared Sub AddHttpProperty (message As Message, status As HttpStatusCode, isXml As Boolean)

參數

message
Message

回覆訊息。

status
HttpStatusCode

HTTP 狀態碼。

isXml
Boolean

定義要寫入至訊息的 ContentType 標頭類型。 若為 trueContentTypetext/xml 內容類型;否則,ContentTypetext/sml

例外狀況

messagenull

適用於