RemoteEndpointMessageProperty(String, Int32) 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化該類別的新實例 RemoteEndpointMessageProperty ,針對指定的 IP 位址與埠,以識別訊息傳送的用戶端。
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
與該訊息相關的遠端端點的埠號。
例外狀況
address 是 null 或空的。
埠號小於零或大於 65535(0xffff)。
備註
請注意,IP 位址和埠號可能會被攻擊者偽造,因此除非新增額外的應用程式特定邏輯,否則不應依賴它來進行安全敏感的驗證或授權。