ExtendVirtualServerInWebFarm Method
The ExtendVirtualServerInWebFarm method of the SPGlobalAdmin class extends a virtual server in a server farm with Microsoft Windows SharePoint Services.
Parameters
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 http://Server_Name:Port_Number/Sample_URL, when the virtual server is extended Sample_URL will be included as part of the URL.
strVirtualServerName A string that specifies the name of a virtual server that contains a content database to use for the extended server.
bCreateNewAppPool true to create an application pool; otherwise, false.
strAppPoolId A string that specifies an ID for the application pool.
bConfigurableAppPoolAccount true to specify that the application pool account is configurable; otherwise, false.
strAppPoolUserName A string that specifies a user name for the administrator account of the application pool. If bCreateNewAppPool is true, specify one of the following values for strAppPoolUserName:
- NetworkService
- LocalService
- LocalSystem
strAppPoolPassword A string that specifies a password for the administrator account of the application pool. The strAppPoolPassword parameter is required only if the bConfigurableAppPoolAccount parameter is set to true.
Return Value
A Microsoft.SharePoint.Administration.SPVirtualServer object that represents the extended virtual server.
Remarks
The ExtendVirtualServerInWebFarm method does not create a new content database, but connects the extended server to the content database of the specified virtual server.
Before extending a virtual server by using the ExtendVirtualServerInWebFarm method, you can customize the web.config file that will be placed on the server by creating an XML file that supplements the web.config file on the current server. For information, see Working with web.config Files in Windows SharePoint Services.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security