RemoteEndpointMessageProperty(String, Int32) 建構函式

定義

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

public:
 RemoteEndpointMessageProperty(System::String ^ address, int port);
public RemoteEndpointMessageProperty (string address, int port);
new System.ServiceModel.Channels.RemoteEndpointMessageProperty : string * int -> System.ServiceModel.Channels.RemoteEndpointMessageProperty
Public Sub New (address As String, port As Integer)

參數

address
String

與訊息關聯之遠端端點的 IP 位址。

port
Int32

與訊息關聯之遠端端點的連接埠號碼。

例外狀況

addressnull 或是空的。

連接埠號碼小於零或大於 65535 (0xffff)。

備註

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

適用於