Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
NetNamedPipeSecurity Class
Collapse the table of content
Expand the table of content

NetNamedPipeSecurity Class

Provides access to the security settings for endpoints configured with the named pipe binding.


Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public sealed class NetNamedPipeSecurity

The NetNamedPipeSecurity type exposes the following members.

Public methodNetNamedPipeSecurityInitializes a new instance of the NetNamedPipeSecurity class.

Public propertyModeGets or sets the security mode for the named pipe binding.
Public propertyTransportGets the transport security for the named pipe binding.

Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodShouldSerializeTransportReturns a a value that indicates whether the Transport property has changed from its default value and should be serialized. This is used by WCF for XAML integration.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

The following code shows how to add a NetNamedPipeSecurity object to a NetNamedPipeBinding instance.

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");

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft