While Windows Server 2003 des both IIS 6.0 and ASP. NET 1.1, these components are disabled by default. this whitepaper describes how to enable IIS 6.0 and ASP. NET 1.1, and recommends several configuration settings to get the optimal performance from IIS and ASP. net.
Applies to ASP. NET 1.1 and IIS 6.0.
ASP. NET 1.1 ships with Windows Server 2003, which also has des the latest version of Internet Information Server (IIS) version 6.0. in IIS 6.0 and ASP. NET 1.1 are designed to integrate seamlessly and ASP. net now defaults to the new IIS 6.0 worker process model.
ASP. NET 1.1 is not installed by default
Unlike previous versions of Microsoft's server operating systems, Internet Information Server (IIS) is not enabled by default; nor is ASP. NET 1.1. There are two options for enabling IIS:
Enabling IIS, Option #1-configure your server wizard
Windows Server 2003 ships a new 'configure your server wizard 'To help you properly configure your server in the desired mode.
To start the wizard-note, to run the wizard you must be logged in as an administrator-go to: Start | programs | Administrative Tools and select 'configure your Server '.
Once selected you shoshould see the 'configure your server wizard' opening screen:
Click 'Next> ':
Click 'Next>'
On this screen you will need to select 'application Server (IIS, ASP. NET) as the options to configure.
Click 'Next> '.
After selecting to configure the server as an application server, this screen will be displayed prompting what additional capabilities shoshould be installed. neither option is selected by default. to enable ASP. net automatically, You need to select 'Enable ASP.. Net '.
Click 'Next> '.
This screen displays what options are to be installed.
Click 'Next> '.
You will see this screen while the options you selected are being installed. it is normal to see other dialog boxes appear as services are being installed. you may additionally be prompted for the location of the Windows 2003 Server installation CD.
Click 'Next> 'when complete.
Click 'finish '-the Windows Server 2003 is now configured to support IIS 6.0 and ASP. NET 1.1.
Enabling IIS, Option #2-manually creating IIS and ASP. NET
If you do not wish to use the 'configure your server wizard 'You can optionally install IIS 6.0 and ASP. NET 1.1 using 'add or remove programs' from the control panel.
First open the control panel:
Next, click on 'add/Remove Windows components' which will open the 'windows components' wizard ':
Highlight and check 'application Server' and then click the 'details' button:
To install ASP. NET, check 'asp. net '.
Click 'OK' to return to the Windows component wizard. click' next> 'from the Windows component Wizard to begin installing:
It is normal to see other dialog boxes appear as services are being installed. You may additionally be prompted for the location of the Windows 2003 Server installation CD.
When installation is complete you will see the last screen of the Windows component Wizard:
IIS 6.0 and ASP. NET 1.1 are now configured and available.
Recommended settings
When running ASP. NET 1.1 with IIS 6.0 there are several configuration settings that are recommended to get the optimal performance from ASP. NET:
- Rolling ing worker process memory limits
- Processing Worker Process reconfiguring
Rolling ing worker process memory limits
By default IIS 6.0 does not set a limit on the amount of memory that IIS is allowed to use. ASP. net's cache feature relies on a limitation of memory so the cache can proactively Remove unused items from memory.
It is recommended that you configure the memory reconfiguring feature of IIS 6.0. to configure this open Internet Information Services Manager (START | programs | Administrative Tools | Internet Information Services ). once open, expand the 'Application pools 'folder:
For each application pool:
1. Right-click on the application pool, e.g. 'defaultapppool ', and select 'properties ':
2. next, enable memory reconfiguring by clicking on either 'maximum used memory (in megabytes ):'. the value shoshould not be more than the amount of physical (not virtual) memory on the server, a good approximation is 60% of the physical memory, I. e. for a server with 512 MB of physical memory select 310. it is also recommended that the maximum not exceed 800 mb when using a 2 GB address space. if the memory address space of the server is 3 GB, the maximum memory limit for the worker process can be as high as 1,800 MB:
Click 'application' and the 'OK' to exit the Properties dialog. Repeat this for all available application pools.
Grouping worker reconfiguring
By default IIS 6.0 is configured to recycle its worker process every 29 hours. This is a bit aggressive for an application running ASP. NET and it is recommended that automatic Worker Process reconfiguring is disabled.
To disable automatic Worker Process reconfiguring, first open Internet Information Services Manager (START | programs | Administrative Tools | Internet Information Services). Once open, expand the 'Application pools 'folder:
For each application pool:
1. Right-click on the application pool, e.g. 'defaultapppool ', and select 'properties ':
2. Uncheck 'recycle worker process (in minutes ):':
Click 'application' and the 'OK' to exit the Properties dialog. Repeat this for all available application pools.
Granting write access to the file system
If your application requires write access to the file system and you are using NTFS you will need to modify an access control list (ACL) on the folder or file to grant ASP. NET access.
For example, to grant ASP. NET write access to the C: \ Inetpub \ wwwroot first open explorer and navigate to the directory:
Next, right-click on the directory, e.g. 'wwwroot' and select Properties. After the Properties dialog opens, select the 'security' tab:
The c: \ Inetpub \ wwwroot \ directory is a special directory in that the special IIS 6.0 group 'iis _ WPG 'is already granted read & execute, list folder contents, and read permissions. however, to grant write permission, you need to click the allow checkbox for write:
IIS 6.0 now has write permission on this folder. To grant write permissions on other folders, follow these steps-note, you may need to add the iis_wpg group if it does not already exist.
Caution:Granting write permission to iis_wpg will allow any ASP. NET application to write to this directory.
Supporting integrated authentication with SQL Server
Integrated Authentication allows for SQL Server to leverage Windows NT authentication to validate SQL Server logon accounts. this allows the user to bypass the standard SQL Server logon process. with this approach, a network user can access a SQL Server database without supplying a separate logon identification or password because SQL Server obtains the user and password information from the Windows NT network security process.
Choosing integrated authentication for ASP. NET applications is a good choice because no credentials are ever stored within your connection string for your application. Rather the connection string used to connect to SQL will look as follows:
"Server = localhost; database = northwind; trusted_connection = true"
This connection string tells SQL Server to use the Windows credentials of the application attempting to access SQL Server. In the case of ASP. NET/IIS 6 This wocould be an account in the iis_wpg group.
To enable integrated authentication between SQL Server and ASP. net, you will need to first ensure that SQL server is configured for either integrated authentication or mixed-mode Authentication-check with your DBA to determine this. if SQL Server is in one of these two modes, you can use integrated authentication.
Open SQL Server Enterprise Manager (START | programs | Microsoft SQL Server | Enterprise Manager), select the appropriate server, and expand the Security Folder:
If 'builtint \ iis_wpg 'group is not listed, right-click on logins and select 'new login ':
In the 'name: 'textbox either enter' [server/domain name] \ iis_wpg 'or click on the ellipses button to open the windows NT user/group Picker:
Select the current machine's iis_wpg group and click 'add' and OK to close the picker.
You then need to also set the default database and the permissions to access the database. To set the default database choose from the drop down list, e.g. Below northwind is selected:
Next, click on the database access tab:
Click on the permit checkbox for every database that you wish to allow access. you will also need to select database roles, checking db_owner will ensure your login has all necessary permissions to manage and use the selected database.
Click OK to exit the Property dialog. Your ASP. NET application is now configured to support integrated SQL Server Authentication.
Don't run ASP. NET 1.0 in IIS 6.0 native mode
ASP. NET 1.0 on IIS 6.0 is only supported in IIS 5 compatibility mode.
To configure ASP. NET 1.0 to run in IIS 5.0 compatibility mode, open Internet Services Manager and right click Web sites and select properties:
Switch to the service tab and check. Run WWW Service in IIS 5.0 Isolation Mode: