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 或空。

端口号小于 0 或大于 65535 (0xffff)。

注解

请注意,攻击者可以假冒该 IP 地址和端口,因此如果不添加其他应用程序特定的逻辑,则不应依赖它们来执行安全敏感的身份验证或授权。

适用于