SPIisWebServiceApplication.ConfigureServiceHost method

This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. Implementers should use Configure(ServiceHostBase, SPServiceAuthenticationMode) instead.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static void ConfigureServiceHost(
	ServiceHostBase serviceHost,
	SPServiceAuthenticationMode authenticationMode
)

Parameters

serviceHost
Type: System.ServiceModel.ServiceHostBase

The service host to configure.

authenticationMode
Type: Microsoft.SharePoint.SPServiceAuthenticationMode

The authentication mode setting for the service host.

// Configure the service host for Windows authentication
            SPIisWebServiceApplication.ConfigureServiceHost(serviceHost, SPServiceAuthenticationMode.Windows);

Show: