RemoteEndpointMessageProperty 類別

定義

讓與傳送訊息之遠端端點關聯的用戶端 IP 位址和連接埠號碼可以使用。

public ref class RemoteEndpointMessageProperty sealed
public sealed class RemoteEndpointMessageProperty
type RemoteEndpointMessageProperty = class
Public NotInheritable Class RemoteEndpointMessageProperty
繼承
RemoteEndpointMessageProperty

備註

屬性會透過 HTTP 和 TCP 傳輸,加入至 Windows Communication Foundation (WCF) 服務的每個傳入訊息。

該屬性不存在於透過具名管道或 MSMQ 傳輸接收到的訊息上。

使用裝載於 IIS 的 HTTP 時,此屬性的可用性取決於目前是否有使用中的要求。 因此,這個屬性會在要求完成之後無法使用,例如當執行單向接收時。

IP 位址和連接埠號碼是接收訊息的節點。 如果訊息會通過轉送或 Proxy,則各轉送或 Proxy 的 IP 位址和連接埠號碼會由此屬性附加至訊息。

請注意,由於 IP 位址和連接埠可能會遭到詐騙攻擊,因此除非加入其他應用程式的特定邏輯,否則不應依賴安全性敏感驗證或授權。

建構函式

RemoteEndpointMessageProperty(String, Int32)

針對可識別傳送訊息之來源用戶端的指定 IP 位址和連接埠,初始化 RemoteEndpointMessageProperty 類別的新執行個體。

屬性

Address

取得傳送訊息之用戶端的 IP 位址。

Name

傳回字串 "System.ServiceModel.Channels.RemoteEndpointMessageProperty"。

Port

取得傳送訊息之用戶端的連接埠號碼。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於