Configuring Step 2: Configure IIS Web Farm Servers
by Keith Newman and Robert McMurray
In the second phase of building your web farm, you configure shared content and shared configuration on your first web server. Then you add more web servers to your farm.
When you are done with these tasks, record your design decisions before going on to Step 3: Configure IIS Web Farm Load Balancing.
2.1. Prepare Your Back-end File Server
In this procedure, you set up a back-end file server with two shared folders. One folder contains the shared content files for the website. The other folder contains the shared configuration files.
Once the shared content folder is ready, copy the files for the website you set up on the primary web server to the content folder.
To set up your back-end file server
- On the file server, open Windows Explorer.
- Create a folder for the shared content, for example
C:\Content
. - Create a folder for the shared configuration, fox example
C:\Config
. - Share the content folder by using the custom user credentials.
- Share the configuration folder by using the custom user credentials.
- Copy the files from the working website on your primary web server to the content folder on the file server, for example
C:\Content\MySite
.
2.2. Configure Shared Content
In this procedure, you set up shared content of your primary web server. When finished, your web server retrieves content from the back-end file server.
To configure shared content
On your primary, open IIS Manager, select you website, and click Advanced Settings in the Actions pane.
On the Advancing Settings page, change the value of Physical Path to the configuration UNC path, for example
\\FileServer\Content\MySite
.Select Physical Path Credentials, and click the ellipsis (...) button.
In the Connect As dialog, select Specific user, and click Set.
Enter the credentials of the custom shared user account, and click OK.
Click OK two more times to exit Advanced Settings.
If your web farm supports ASP.NET, open command prompt, and enter one the following commands depending on your system:
- 64-bit systems:
cd %windir%\Microsoft.NET\Framework64\v4.030319
- 32-bit systems:
cd %windir%\Microsoft.NET\Framework\v4.030319
- 64-bit systems:
Enter the following command:
caspol -m -ag 1. -url file://<file server>/<content>/<website>/* FullTrust
Replace
<file server>
with the name of your file server. Replace<content>
with the name of your shared content folder. Replace<website>
with the folder name for your website. Note FullTrust is case-sensitive.Close the command prompt, select Application Pools in the Connections page.
Select the application pool for your site, and click Recycle in the Actions pane.
Open a browser, view your site with localhost. The site is displayed as usual, but the content is coming from the back-end file server.
2.3. Set up Shared Configuration
To configure shared configuration, export the configuration files to the back-end file server. Then point the web server to the shared configuration location.
To set up shared configuration
- Open IIS Manager, select your server name, and double-click Shared Configuration.
- In the Actions pane, click Export Configuration.
- In the Physical path box, type the UNC path for the shared configuration folder on the file server, for example
\\FileServer\Config
. - Click Connect As.
- Enter the credentials of the custom shared user account, and click OK.
- Under Encryption Keys, type a password for encryption the configuration files, and confirm the password.
- Click OK.
- On the Shared Configuration page, select the Enable shared configuration check box.
- In the Physical path box, type the UNC path to the configuration folder on the file server.
- In the User name box, type the custom shared user name.
- In the Password and Confirm password boxes, type the password for the custom share user account.
- In the Actions pane, click Apply.
- In the Encryption Keys Password dialog, type the encryption keys password and click OK.
- Close IIS Manager, and reopen it. IIS is now using the configuration files that are located of the file server.
2.4. Add Web Servers to Your Farm
A web server added to your farm by using this procedure retrieves both configuration information and website content from the back-end file server.
To add a web server to your farm
Open IIS Manager, select your server name, and double-click Shared Configuration.
On the Shared Configuration page, select the Enable shared configuration check box.
In the Physical path box, type the UNC path to the configuration folder on the file server.
In the User name box, type the custom shared user name.
In the Password and Confirm password boxes, type the password for the custom share user account.
In the Actions pane, click Apply.
In the Encryption Keys Password dialog, type the encryption keys password and click OK.
Close and reopen IIS Manager.
If your web farm supports ASP.NET, open command prompt, and enter one the following commands depending on your system:
- 64-bit systems:
cd %windir%\Microsoft.NET\Framework64\v4.030319
- 32-bit systems:
cd %windir%\Microsoft.NET\Framework\v4.030319
- 64-bit systems:
Enter the following command:
caspol -m -ag 1. -url file://<file server>/<content>/<website>/* FullTrust
Replace
<file server>
with the name of your file server. Replace<content>
with the name of your shared content folder. Replace<website>
with the folder name for your website. Note FullTrust is case-sensitive.Close the command prompt, select Application Pools in the Connections page.
Select the application pool for your site, and click Recycle in the Actions pane.
Open a browser, view your site with localhost. The site displays like it did on the primary server.