SPGlobalAdmin.ExtendVirtualServer method (String, String, String, String, Uri, Boolean, String, Boolean, String, String, Boolean, Boolean)
NOTE: This API is now obsolete.
Use the SPWebApplicationBuilder class to create a new Web application instead. (In Windows SharePoint Services 2.0 the ExtendVirtualServer method extended an Internet Information Services (IIS) Web site with SharePoint Foundation, and is maintained for backward compatibility.)
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
<ObsoleteAttribute("SPGlobalAdmin.ExtendVirtualServer is obsolete. To create a new Web application, use the SPWebApplicationBuilder class.", _
False)> _
Public Function ExtendVirtualServer ( _
strDatabaseServer As String, _
strDatabaseName As String, _
strUserName As String, _
strPassword As String, _
uri As Uri, _
bCreateNewAppPool As Boolean, _
strAppPoolId As String, _
bConfigurableAppPoolAccount As Boolean, _
strAppPoolUserName As String, _
strAppPoolPassword As String, _
bAllowAnonymous As Boolean, _
bEnsureNTLM As Boolean _
) As SPVirtualServer
'Usage
Dim instance As SPGlobalAdmin
Dim strDatabaseServer As String
Dim strDatabaseName As String
Dim strUserName As String
Dim strPassword As String
Dim uri As Uri
Dim bCreateNewAppPool As Boolean
Dim strAppPoolId As String
Dim bConfigurableAppPoolAccount As Boolean
Dim strAppPoolUserName As String
Dim strAppPoolPassword As String
Dim bAllowAnonymous As Boolean
Dim bEnsureNTLM As Boolean
Dim returnValue As SPVirtualServer
returnValue = instance.ExtendVirtualServer(strDatabaseServer, _
strDatabaseName, strUserName, strPassword, _
uri, bCreateNewAppPool, strAppPoolId, _
bConfigurableAppPoolAccount, strAppPoolUserName, _
strAppPoolPassword, bAllowAnonymous, _
bEnsureNTLM)
[ObsoleteAttribute("SPGlobalAdmin.ExtendVirtualServer is obsolete. To create a new Web application, use the SPWebApplicationBuilder class.",
false)]
public SPVirtualServer ExtendVirtualServer(
string strDatabaseServer,
string strDatabaseName,
string strUserName,
string strPassword,
Uri uri,
bool bCreateNewAppPool,
string strAppPoolId,
bool bConfigurableAppPoolAccount,
string strAppPoolUserName,
string strAppPoolPassword,
bool bAllowAnonymous,
bool bEnsureNTLM
)
Parameters
strDatabaseServer
Type: System.StringA string that specifies the database server.
strDatabaseName
Type: System.StringA string that contains the name of the database.
strUserName
Type: System.StringA string that contains the user name for the administrator account. The parameter is required only if SQL authentication is used.
strPassword
Type: System.StringA string that contains the password for the administrator account. The parameter is required only if SQL authentication is used.
uri
Type: System.UriAn 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.
bCreateNewAppPool
Type: System.Booleantrue to create an application pool; otherwise, false.
strAppPoolId
Type: System.StringA string that specifies an ID for the application pool.
bConfigurableAppPoolAccount
Type: System.Booleantrue to indicate that the application pool account is configurable; otherwise, false.
- strAppPoolUserName
Type: System.StringA string that specifies a user name for the administrator account of the application pool. If is true, specify one of the following values:
NetworkService
LocalService
LocalSystem
strAppPoolPassword
Type: System.StringA 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.Booleantrue to allow anonymous access; otherwise, false.
bEnsureNTLM
Type: System.Booleantrue 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.