

You can use this configuration when both client and server are on the same Windows domain. The following code shows the mode being set and the credential type set to Windows. The credential type values correspond to IIS directory security mechanisms. This is done by setting the security mode to Transport and then setting the client credential type. Consequently, the transport security for this binding is designed for seamless interoperation with IIS sites. The BasicHttpBinding class is primarily used to interoperate with existing Web services, and many of those services are hosted by Internet Information Services (IIS). To enable transport security, set the property to Transport. However, you can switch on security by setting the Mode property to any value except None.

This binding is designed for interoperability with Web service providers that do not implement security. BasicHttpBindingīy default, the BasicHttpBinding class does not provide security. ServiceAuthorizationBehavior is a service behavior that can be set on the service description. To prevent this from happening set the ServiceAuthorizationBehavior.PrincipalPermissionMode to PrincipalPermissionMode.None. When transport security is used, the Thread.CurrentPrincipal property may be overwritten.
