NetNamedPipeSecurityMode 列舉

定義

指定傳輸層級安全性是否搭配具名管道一起使用。Specifies whether transport-level security is used with named pipes.

public enum class NetNamedPipeSecurityMode
public enum NetNamedPipeSecurityMode
type NetNamedPipeSecurityMode = 
Public Enum NetNamedPipeSecurityMode
繼承
NetNamedPipeSecurityMode

欄位

None 0

表示具名管道傳輸未使用安全性。Indicates no security is used with the named pipe transport.

Transport 1

表示傳輸層級安全性搭配具名管道傳輸一起使用。Indicates that transport-level security is used with the named pipe transport.

範例

NetNamedPipeBinding nnpb = new NetNamedPipeBinding();
NetNamedPipeSecurity nnpSecurity = nnpb.Security;
nnpSecurity.Mode = NetNamedPipeSecurityMode.Transport;
NamedPipeTransportSecurity npts = nnpSecurity.Transport;
serviceHost.AddServiceEndpoint(typeof(ICalculator), nnpb, "net.pipe://localhost/ServiceModelSamples/Service");

備註

使用此列舉來指定在使用 NetNamedPipeBinding 時,傳輸層級安全性是否搭配具名管道一起使用。Use this enumeration to specify whether transport-level security is used with named pipes when using the NetNamedPipeBinding. 預設值為 Transport。The default value is Transport.

適用於