SPGlobalAdmin.ExtendVirtualServerInWebFarm method (Uri, String, Boolean, String, Boolean, String, String, Boolean, Boolean)

NOTE: This API is now obsolete.

To extend a Web application to a new Internet Information Services (IIS) Web site, add a new entry to the IIS settings through the IisSettings property of the SPWebApplication class. SharePoint Foundation automatically handles duplication of IIS Web sites on other computers in the server farm. (In Windows SharePoint Services 2.0, the ExtendVirtualServerInWebFarm method extended a virtual server in a server farm with SharePoint Foundation, and is maintained for backward compatibility.)

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

Syntax

'Declaration
<ObsoleteAttribute("To extend a web application to a new iis web site, add a new entry to SPWebApplication.IisSettings.  Duplicating IIS Web Sites on other machines in the farm is now handled automattically.",  _
    False)> _
Public Function ExtendVirtualServerInWebFarm ( _
    uri As Uri, _
    virtualServerName As String, _
    bCreateNewAppPool As Boolean, _
    appPoolId As String, _
    bConfigurableAppPoolAccount As Boolean, _
    appPoolUserName As String, _
    appPoolPassword As String, _
    bAllowAnonymous As Boolean, _
    bEnsureNTLM As Boolean _
) As SPVirtualServer
'Usage
Dim instance As SPGlobalAdmin
Dim uri As Uri
Dim virtualServerName As String
Dim bCreateNewAppPool As Boolean
Dim appPoolId As String
Dim bConfigurableAppPoolAccount As Boolean
Dim appPoolUserName As String
Dim appPoolPassword As String
Dim bAllowAnonymous As Boolean
Dim bEnsureNTLM As Boolean
Dim returnValue As SPVirtualServer

returnValue = instance.ExtendVirtualServerInWebFarm(uri, _
    virtualServerName, bCreateNewAppPool, _
    appPoolId, bConfigurableAppPoolAccount, _
    appPoolUserName, appPoolPassword, _
    bAllowAnonymous, bEnsureNTLM)
[ObsoleteAttribute("To extend a web application to a new iis web site, add a new entry to SPWebApplication.IisSettings.  Duplicating IIS Web Sites on other machines in the farm is now handled automattically.", 
    false)]
public SPVirtualServer ExtendVirtualServerInWebFarm(
    Uri uri,
    string virtualServerName,
    bool bCreateNewAppPool,
    string appPoolId,
    bool bConfigurableAppPoolAccount,
    string appPoolUserName,
    string appPoolPassword,
    bool bAllowAnonymous,
    bool bEnsureNTLM
)

Parameters

  • uri
    Type: System.Uri

    An absolute URI for the virtual server, which includes the host name, port number, and custom URL information. For example, if the URI is https://Server_Name:Port_Number/Sample_URL, when the virtual server is extended Sample_URL is included as part of the URL.

  • virtualServerName
    Type: System.String

    A string that specifies the name of a virtual server that contains a content database to use for the extended server.

  • bCreateNewAppPool
    Type: System.Boolean

    true to create an application pool; otherwise, false.

  • appPoolId
    Type: System.String

    A string that specifies an ID for the application pool.

  • bConfigurableAppPoolAccount
    Type: System.Boolean

    true to specify that the application pool account is configurable; otherwise, false.

  • appPoolUserName
    Type: System.String
    • A string that specifies a user name for the administrator account of the application pool. If true, specify one of the following values:

    • NetworkService

    • LocalService

    • LocalSystem

  • appPoolPassword
    Type: System.String

    A string that specifies a password for the administrator account of the application pool. The parameter is required only if the parameter is set to true.

  • bAllowAnonymous
    Type: System.Boolean

    true to allow anonymous access; otherwise, false.

  • bEnsureNTLM
    Type: System.Boolean

    true to use NTLM for authentication; otherwise, false. The default value is false.

Return value

Type: Microsoft.SharePoint.Administration.SPVirtualServer
An SPVirtualServer object that represents the extended virtual server.

See also

Reference

SPGlobalAdmin class

SPGlobalAdmin members

ExtendVirtualServerInWebFarm overload

Microsoft.SharePoint.Administration namespace