NetMsmqBinding.UseActiveDirectory 属性
定义
获取或设置一个值,该值指示是否应该使用 Active Directory 来转换队列地址。Gets or sets a value that indicates whether queue addresses should be converted using Active Directory.
public:
property bool UseActiveDirectory { bool get(); void set(bool value); };
public bool UseActiveDirectory { get; set; }
member this.UseActiveDirectory : bool with get, set
Public Property UseActiveDirectory As Boolean
属性值
如果应该使用 Active Directory 转换队列地址,则为 true;否则为 false。true if queue addresses should be converted using Active Directory; otherwise, false.
示例
下面的代码演示如何设置 UseActiveDirectory 属性。The following code shows how to set the UseActiveDirectory property.
NetMsmqBinding binding = new NetMsmqBinding();
binding.UseActiveDirectory = true;
注解
消息队列 (MSMQ) 队列地址可由路径名或直接格式名组成。The Message Queuing (MSMQ) queue addresses can consist of path names or direct format names. 包含直接格式名时,消息队列可使用 DNS、NetBIOS 或 IP 解析队列名称。With a direct format name, Message Queuing resolves the queue name using DNS, NetBIOS or IP. 包含路径名时,消息队列可使用 Active Directory 解析队列名称。With a path name, Message Queuing resolves the queue name using Active Directory.
默认情况下,Windows Communication Foundation (WCF) 排队传输会将消息队列的 URI 转换为直接格式名。By default, the Windows Communication Foundation (WCF) queued transport converts the URI of a message queue to a direct format name. 通过将 UseActiveDirectory 属性设置为 true,应用程序可以指定排队传输应使用 Active Directory 而不是 DNS、NetBIOS 或 IP 来解析队列名。By setting the UseActiveDirectory property to true, an application can specify that the queued transport should resolve the queue name using Active Directory rather than DNS, NetBIOS, or IP.