You are on page 1of 27

DOT Net Technologies

Unit 9

Unit 9
Structure: 9.1 9.2 9.3 9.3 9.4 9.5 9.6 9.7 Internet Information Services (IIS) Objectives IIS 6.0 Architecture (IIS 6.0) Creating Application Pools (IIS 6.0) Managing Application Pools in IIS 6.0

Website Deployment

Deploying Your ASP.NET Applications Summary Self Assessment Questions Terminal Questions Answers to Self Assessment Questions

9.1 Internet Information Services (IIS)


The Internet Information Services technology (IIS) component is a macro component that bundles the IIS components that are found in the Software\System\Networking & Communications\Infrastructure directory in the component browser. By using this component, you can quickly add IIS support to your device. By default, this macro component will add only the IIS Web Server component to your configuration. To include other components, enable them in the Settings page for this macro component. Services: There are no services associated with this component. Associated Components: No other components interact with this component. Settings: This component can be configured by using Target Designer to include or exclude optional components from the bundle. Because this component includes a number of applications, its footprint is sizeable. To reduce the footprint of your run-time image, in Target Designer on the
Sikkim Manipal University Page No. 295

DOT Net Technologies

Unit 9

Components tab, clear the check boxes for all components that are not required in your configuration. IIS 6.0 Operations Guide (IIS 6.0) Internet Information Services (IIS) 6.0 with the Microsoft Windows Server 2003 operating system provides integrated, reliable, scalable, secure, and manageable Web server capabilities over an intranet, the Internet, or an extranet. IIS is a tool for creating a strong communications platform of dynamic network applications. Organizations of all sizes use IIS to host and manage Web pages on the Internet or on their intranet, to host and manage FTP sites, and to route news or mail using the Network News Transfer Protocol (NNTP) and the Simple Mail Transfer Protocol (SMTP). IIS 6.0 leverages the latest Web standards like Microsoft ASP.NET, XML, and Simple Object Access Protocol (SOAP) for the development, implementation, and management of Web applications. IIS 6.0 includes new features designed to help organizations, IT professionals, and server administrators achieve their goals of performance, reliability, scalability, and security for potentially thousands of Web sites either on a single IIS server or on multiple servers. Features of IIS 6.0: The following table lists all the features of IIS 6.0.
IIS 6.0 Feature Reliability Description IIS 6.0 uses a new request-processing architecture and application isolation environment that enables individual Web applications to function within a self-contained worker process. This environment prevents one application or Web site from stopping another, and reduces the amount of time administrators spend restarting services to correct problems related to applications. The new environment also includes proactive Application Pool Health. IIS 6.0 introduces a new kernel-mode driver for HTTP parsing and caching, specifically tuned to increase Web server throughput and scalability of multiprocessor computers, thereby significantly increasing the following: The number of sites a single IIS 6.0 server can host The number of concurrently-active worker processes Also, by Configuring Startup and Shutdown Time Limits , Sikkim Manipal University Page No. 296

Scalability

DOT Net Technologies

Unit 9

IIS allocates resources to active sites, as opposed to wasting resources on idle requests. Security IIS 6.0 provides significantly improved security over earlier versions of IIS. To reduce the attack surface of systems, IIS is not installed by default on the operating systems in the Windows Server 2003 family. Administrators must explicitly select and install IIS. IIS installs by default in a locked-down state, capable of serving only static content. Using the Web Service Extensions node, Web site administrators can Configuring IIS For Dynamic Content IIS functionality based on the individual needs of their organization. IIS 6.0 includes a variety of Security in IIS 6.0 features and technologies to help ensure the integrity of your Web and FTP site content, as well as the data transmitted through your sites. IIS security features include the following security-related tasks: Authentication in IIS 6.0 Manageability Access Control with IIS 6.0 IIS 6.0 Encryption Certificates Auditing in IIS 6.0

To meet the needs of a diverse set of organizations, IIS provides a variety of manageability and administration tools. Administrators can configure an IIS 6.0 server using IIS Manager, Using Command-Line Administration Scripts, or by directly Enabling Edit-While-Running in IIS 6.0. Administrators can also Administering Servers Remotely in IIS 6.0 IIS servers and sites. Compared to earlier operating systems, the Windows Server 2003 family offers an improved developer experience with About ASP.NET and IIS integration. ASP.NET recognizes most ASP code while providing greater functionality for building enterprise-class Web applications that can work as a part of the Microsoft .NET Framework. Using ASP.NET allows you to take full advantage of the features of the common language runtime, such as type safety, inheritance, language interoperability, and versioning. IIS 6.0 also offers support for the latest Web standards, including XML, SOAP, and Internet Protocol Version 6 Features. IIS 6.0 is compatible with most existing applications, based on feedback from thousands of customers and independent software vendors (ISVs). Also, to ensure maximum compatibility, IIS 6.0 can be configured to run in IIS 5.0 Isolation Mode in IIS 6.0.

Enhanced Development

Application Compatibility

Sikkim Manipal University

Page No. 297

DOT Net Technologies

Unit 9

Web Application Technologies (IIS 6.0) The Windows Server 2003 family offers an improved developer experience with ASP.NET and IIS integration. Microsoft ASP.NET recognizes most ASP code while providing greater functionality for building enterprise-class Web applications that can work as a part of the Microsoft .NET Framework. Using ASP.NET allows you to take full advantage of the features of the common language runtime, such as type safety, inheritance, language interoperability, and versioning. IIS 6.0 also offers support for the latest Web standards, including XML, Simple Object Access Protocol (SOAP) and Internet Protocol Version 6 (IPv6.0). Web Distributed Authoring and Versioning Web Distributed Authoring and Versioning (WebDAV) enables remote authors to create, move, or delete files, file properties, directories, and directory properties on your server over an HTTP connection. News and Mail You can use News Network Transport Protocol (NNTP) and Simple Mail Transfer Protocol (SMTP) services to set up intranet news and mail services that work in conjunction with IIS. HTTP Compression HTTP Compression provides faster transmission of pages between the Web server and compression-enabled clients. It compresses and caches static files, and performs on-demand compression of dynamically generated files. Internet Protocol Version 6 Features (IIS 6.0) This version of IIS provides Internet services to clients connecting over the next generation of Internet Protocol (IP) known as IP version 6, or IPv6. IPv6 is included with the Microsoft Windows XP networking platform and the Microsoft Windows Server 2003 family. The Internet Server API (ISAPI) framework provides the appropriate local- and remote-host server variables
Sikkim Manipal University Page No. 298

DOT Net Technologies

Unit 9

for IPv6 network addresses: LOCAL_ADDR and REMOTE_ADDR. When clients connect over IPv6, these variables store the IPv6 address. When writing applications that use the ISAPI server variables for network addressing over IPv6, remember that all buffers allocated for network address storage can be a maximum of 128 bits in size (56 character string), whereas buffers allocated for network address storage over IPv4 are limited to 32 bits (16 character string). After the protocol stack is installed, IIS automatically begins supporting IPv6 on your Web server. Web sites that are already running must be restarted before they begin listening for IPv6 requests. Sites created after IPv6 support is enabled automatically listen for IPv6. Functionality The IIS core functionality has not changed as a result of IPv6 support; however, only a subset of all IIS 6.0 functionality is available for IPv6. IIS Manager does not display IPv6 addresses as it does for IPv4 addresses. Bandwidth Throttling is not supported for IPv6 Web sites. The ServerBindings metabase property does not support storing IPv6 literal addresses (as defined in RFC 2732). This behavior limits IIS to support host-header routing only. The IP Address Restrictions feature in IIS does not support IPv6 addresses or IPv6 prefixes. The EnableReverseDnsLookup metabase property is not supported. Setting this property to true does not cause the REMOTE_HOST server variable to return the DNS name of the client, as it does for IPv4. REMOTE_HOST will always contain the IPv6 address regardless of the EnableReverseDNSLookup setting.

Sikkim Manipal University

Page No. 299

DOT Net Technologies

Unit 9

Site routing based on IP addresses is not supported for IPv6. Server address with sites that are configured to route based on IPv4 addresses will not respond to IPv6 requests.

IPv6 is enabled for all sites. You cannot configure IPv6 support at the machine level. In other words, you cannot configure individual sites to respond to IPv6 traffic while other sites on the same server respond to IPv4 traffic. It is possible, however, to limit IPv6 traffic to a specific site if that site is configured to use IP-based routing on an IPv4 address.

Logging. IIS writes IPv6 addresses to the log file when IPv6 is enabled and client computers connect to the server using IPv6 addresses. Log parsing tools must support IPv6 address formats if they are to be used with log files for IPv6 sites.

SSL. Due to the IP routing restriction for IPv6, IIS deployments designed for IPv6 addresses are limited to one Secure Sockets Layer (SSL) site per computer.

Objectives This unit describes the Microsoft Internet Information Service (IIS 6.0) and its usage as a Web server in Web Application deployment. At the end of this unit the reader would be able to: 1. Define and Describe the IIS and its features 2. Describe the architecture of IIS 6.0 3. Explain the mechanism of creating application pools in IIS 4. Discuss how to manage application pools in IIS 6.0 5. Demonstrate how to deploy ASP.NET applications using IIS 6.0

9.2 IIS 6.0 Architecture (IIS 6.0)


Internet Information Services (IIS) version 6.0, which runs on all editions of the Microsoft Windows Server 2003 operating system, provides a new architecture that offers flexibility in the choice of two application isolation modes. The new architecture helps you run a faster Web service that is more reliable and secure. IIS 6.0 provides a redesigned World Wide Web
Sikkim Manipal University Page No. 300

DOT Net Technologies

Unit 9

Publishing Service (WWW service) architecture that can help you achieve better performance, reliability, scalability, and security for your Web sites, whether they run on a single server running IIS or on multiple servers. IIS 6.0 runs a server in one of the two distinct request processing models, called Application Isolation Modes. Application Isolation is the separation of applications by process boundaries that prevents one application or Web site from affecting another and reduces the time that you spend restarting services to correct problems related to applications. In IIS 6.0, application isolation is configured differently for each of the two IIS application isolation modes. Both modes rely on the HTTP protocol stack (also referred to as HTTP.sys) to receive Hypertext Transfer Protocol (HTTP) requests from the Internet and return responses. HTTP.sys resides in kernel mode, where operating system code, such as device drivers, runs. HTTP.sys listens for, and queues, HTTP requests. The new request-processing architecture and application isolation

environment enables individual Web applications, which always run in user mode, to function within a self-contained worker process. A worker process is user-mode code whose role is to process requests, such as returning a static page or invoking an Internet Server API (ISAPI) extension or filter. Worker processes use HTTP.sys to receive requests and send responses over HTTP. IIS 6.0 Request Processing Models Worker process isolation mode is the new IIS request processing model. In this application isolation mode, you can group Web applications into application pools, through which you can apply configuration settings to the worker processes that service those applications. An application pool corresponds to one request routing queue within HTTP.sys and one or more worker processes. Worker process isolation mode enables you to completely separate an application in its own process, with no dependence on a central process
Sikkim Manipal University Page No. 301

DOT Net Technologies

Unit 9

such as Inetinfo.exe to load and execute the application. All requests are handled by worker processes that are isolated from the Web server itself. Process boundaries separate each application pool so that when an application is routed to one application pool, applications in other application pools do not affect that application. By using application pools, you can run all application code in an isolated environment without incurring a performance penalty. For a visual representation of worker process isolation mode architecture, see Figure 9.1.

Figure 9.1: Architecture of Worker Process Isolation Mode

Worker process isolation mode delivers all the benefits of the new IIS 6.0 architecture, including multiple application pools, health monitoring and recycling, increased security and performance, improved scalability, and processor affinity. For example, the new health monitoring features can help you discover and prevent application failures, and can also help protect your Web server from imperfect applications.
Sikkim Manipal University Page No. 302

DOT Net Technologies

Unit 9

IIS 6.0 Services IIS 6.0 provides the following four Internet services: The World Wide Web Publishing Service (WWW service) for hosting Internet and intranet content; The File Transfer Protocol (FTP) service for hosting sites where users can upload and download files; The Network News Transfer Protocol (NNTP) service for hosting discussion groups; and The Simple Mail Transfer Protocol (SMTP) service for sending and receiving e-mail messages. After installing these services, you can create sites or virtual servers, configure properties and security settings, and set up components to further customize your system. WWW Service Administration and Monitoring, which is a new set of features that were added to the WWW service in IIS 6.0, manages worker processes, supports the new request processing model, and is responsible for health management and maintenance, including application pool health monitoring, recycling worker processes, and rapid-fail protection. IIS Admin service is a service of the Microsoft Windows Server 2003, Standard Edition; Microsoft Windows Server 2003, Enterprise Edition; Microsoft Windows Server 2003, Web Edition; and Microsoft

Windows Server 2003, Datacenter Edition operating systems. The IIS Admin service manages the IIS metabase, which stores IIS configuration data. The IIS Admin service makes metabase data available to applications and the core components of IIS. Internet Information Services (IIS) 6.0, running on Microsoft Windows Server 2003, helps to provide a secure, reliable, and easily managed application server on which you can host sites over an intranet, the Internet,
Sikkim Manipal University Page No. 303

DOT Net Technologies

Unit 9

or an extranet. IIS helps you create a platform of dynamic network applications, allowing you to use the latest Web standards to develop, implement, and manage your Web applications. To match the needs of your applications to your server, IIS offers an adjustable architecture that allows you to isolate applications within a selfcontained worker process. The new process model helps prevent one application or Web site from stopping another and reduces the time that you spend restarting services to maintain the health of your server. If health issues arise, IIS helps you to manage them, usually without restarting your Web server or affecting your users.

9.3 Creating Application Pools (IIS 6.0)


When you run IIS 6.0 in worker process isolation mode, you can isolate different Web applications or Web sites in pools, which are called Application Pools. An application pool is a group of URLs that are routed to one or more worker processes that share the same configuration. The URLs that you assign to an application pool can be for an application, a Web site, a Web directory, or a virtual directory. In an application pool, process boundaries separate each worker process from other worker processes so that when an application is routed to one application pool, applications in other application pools do not affect that application. By using an application pool, you can assign specific configuration settings to a worker process (or, in the case of a Web garden, to a set of worker processes) that services a group of applications. For example, you can configure worker process recycling, which offers several configuration options to match the needs of each application. If, for example, you suspect that an application has a memory leak, you might configure the application pools worker process to recycle when its memory use reaches a certain
Sikkim Manipal University Page No. 304

DOT Net Technologies

Unit 9

threshold. If another application fails because of the volume of requests that it receives, you can set the application pools worker process to recycle when the application exceeds a specified number of requests. By creating new application pools and assigning Web sites and applications to them, you can make your server more efficient, reliable, and secure, and ensure that your applications remain available even when a worker process serving an application pool is recycled because of a faulty application. Configuring Application Pools in IIS 6.0 (IIS 6.0) Note: This feature of IIS 6.0 is available only when running in worker process isolation mode. An application pool is a configuration that links one or more applications to a set of one or more worker processes. Because applications in an application pool are separated from other applications by worker process boundaries, an application in one application pool is not affected by problems caused by applications in other application pools. By creating new application pools and assigning Web sites and applications to them, you can make your server more efficient and reliable, as well as making your other applications always available, even when the worker process serving the new application pool has problems. Guidelines for Creating Application Pools To isolate Web applications on a Web site from Web applications on other sites running on the same computer, create an individual application pool for each Web site. For enhanced security, configure a unique user account (process identity) for each application pool. Use an account with the least user rights possible, such as Network Service in the IIS_WPG group. If there is a test version of an application on the same server with the production version of the application, separate the two versions into
Sikkim Manipal University Page No. 305

DOT Net Technologies

Unit 9

different application pools. This isolates the test version of the application. As a design consideration, if you want to configure an application to run with its own unique set of properties, create a unique application pool for that application. Note: You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc". Steps to create a new Application Pool: 1. In IIS Manager, expand the local computer, right-click Application Pools, point to New, and then click Application Pool. 2. In the Application pool name box, type the name of the new application pool. 3. If the ID that appears in Application pool ID box is not the ID that you want, type a new ID. 4. Under Application pool settings, click the appropriate setting. If you click Use existing application pool as template, in Application pool name box, right-click the application pool that you want to use as a template. 5. Click OK. Application pools allow you to apply configuration settings to groups of applications and the worker processes that service those applications. Any Web site, Web directory, or virtual directory can be assigned to an application pool.
Sikkim Manipal University Page No. 306

DOT Net Technologies

Unit 9

Assigning an application to an application pool: In IIS Manager, right-click the application that you want to assign to an application pool, and then click Properties. Click the Virtual Directory, Directory, or Home Directory tab. If you are assigning a directory or virtual directory, verify that Application name is filled in. If the Applicationname box is not filled in, click Create, and then type a name. In the Application pool list box, click the name of the application pool to which you want to assign the Web site. About Configuring Servers for Applications (IIS 6.0) Internet Information Services (IIS) 6.0 delivers Web hosting services through an adjustable architecture that you can use to manage server resources with improved stability, efficiency, and performance. IIS separates applications into isolated pools and automatically detects memory leaks, defective processes, and over-utilized resources. When problems occur, IIS manages them by shutting down and redeploying faulty resources and connecting faulty processes to analytical tools. IIS can run in either of two mutually exclusive modes of operation: Worker process isolation mode. This is the default mode of IIS 6.0, isolates key components of the World Wide Web Publishing Service (WWW service) from the effects of errant applications, and it protects applications from each other by using the worker process component. Use worker process isolation mode unless you have a specific compatibility issue that makes the use of IIS 5.0 isolation mode necessary. Web sites that serve static content or simple ASP applications should be able to move to IIS 6.0 running in worker process isolation mode with little or no modification.

Sikkim Manipal University

Page No. 307

DOT Net Technologies

Unit 9

IIS 5.0 isolation mode. With this mode, you can run applications that are incompatible with worker process isolation mode because they were developed for earlier versions of IIS. Applications that run correctly on IIS 5.0 should run correctly on IIS 6.0 in IIS 5.0 isolation mode.

Worker process isolation mode provides better default security for running Web applications than IIS 5.0 isolation mode. By default, worker processes run with the Network Service identity. The Network Service account has lower access rights than the default account for IIS 5.0 isolation mode. Web applications that run in-process in IIS 5.0 application mode run as LocalSystem. The LocalSystem account can read, execute, and change most of the resources on the computer. The default isolation mode upon installing IIS 6.0 depends on whether you perform a clean installation or an upgrade. After a clean install of IIS 6.0, IIS runs in worker process isolation mode. After an upgrade from an earlier version of IIS 6.0, the isolation mode is the same as configured on the previously-installed version of IIS 6.0. After an upgrade from IIS 5.0 or IIS 4.0, IIS 6.0 runs in IIS 5.0 isolation mode by default to maintain compatibility with your existing applications. Worker Process Isolation Mode IIS 6.0 introduces worker process isolation mode, which runs all Web applications in an isolated environment. When you run IIS in worker process isolation mode, applications can be configured to run in separate application pools. Each application pool is a logical representation of a configurable worker process and links to the applications in the pool. Worker processes operate independently of each other; they can fail without affecting other worker processes. The pooling of applications protects applications from the effects of worker processes that support other application pools. In this way, applications are protected from each other.
Sikkim Manipal University Page No. 308

DOT Net Technologies

Unit 9

In worker process isolation mode, Hypertext Transfer Protocol (HTTP) requests are routed directly to an in-kernel application pool queue serving the configured application. Worker processes that serve an application pool pull the requests directly from the queue, avoiding process-switching overhead. To further protect your WWW service, IIS 6.0 isolates critical World Wide Web Publishing Service (WWW service) components, such as the HTTP protocol stack (HTTP.sys) and WWW Service Administration and

Monitoring, from the effects of third-party code running in worker processes. HTTP.sys receives and queues requests for WWW services. When a worker process enters an unhealthy state, and thus stops processing requests, HTTP.sys continues to process requests. Meanwhile, the WWW service detects that the worker process is unhealthy and shuts it down. If there is demand for a new worker process to serve requests (HTTP.sys has requests queued), the WWW service starts a new worker process to pick up the queued requests from HTTP.sys. Even though a worker process has failed, the WWW service continues to process requests and shields the user from experiencing a loss of service. IIS 6.0 worker process isolation mode delivers the following specific improvements over earlier versions of IIS: Robust Performance Isolation prevents Web applications and Web sites from affecting each other or the WWW service. Reboots of the operating system and restarting of the WWW service are avoided. Self - Healing Automated management provides auto-restart of failed worker processes and periodic restart of deteriorating worker processes. Scalability Web gardens allow more than one worker process to serve the same application pool. Process Affinity enables the connection of worker processes to specific processors on multi-CPU servers.
Sikkim Manipal University Page No. 309

DOT Net Technologies

Unit 9

Automated Debugging The debugging feature enables the automatic assignment of failing worker processes to debugging tools.

CPU Limiting This monitoring feature enables controlling the amount of CPU resources that an application pool consumes in a configured amount of time.

9.4 Deploying Your ASP.NET Applications


Deploying ASP.NET Applications in IIS 6.0 (IIS 6.0) Microsoft Windows Server 2003 includes support for ASP.NET

applications and the Microsoft .NET Framework version 1.1 with the operating system installation. This chapter describes how to deploy ASP.NET applications on a newly installed server running Internet Information Services (IIS) 6.0. Version 1.1 of the .NET Framework is installed with Windows Server 2003. Most ASP.NET applications run without modification on version 1.1 of the .NET Framework. Overview of Deployment process using IIS 6.0 ASP.NET is a unified Web application platform that provides services to help you build and deploy enterprise-class Web applications and XMLbased Web services. ASP.NET Windows Server 2003, Enterprise Edition; Standard is supported on the Edition; Microsoft

Windows Server2003, Datacenter Edition; and

Windows Server2003,

Windows Server2003, Web Edition operating systems. ASP.NET is installed with the Microsoft .NET Framework version 1.1 as a part of Windows Server 2003. However, to run ASP.NET applications, you must also install IIS 6.0. ASP.NET is not available on the following the operating 64-bit systems: of

Microsoft Windows XP

64-Bit

Edition;

version

Sikkim Manipal University

Page No. 310

DOT Net Technologies

Unit 9

Windows Server 2003, Enterprise Edition; and the 64-bit version of Windows Server 2003, Datacenter Edition. The deployment process presented in this section describes how to deploy ASP.NET applications on a newly installed IIS 6.0 Web server. Before you begin this process, complete the following steps: Install Windows Server 2003, which includes version 1.1 of the .NET Framework, with the default options. Install IIS 6.0 with the default settings in Add or Remove Programs in Control Panel. When you configure IIS 6.0 to run in IIS 5.0 isolation mode, the settings in the <processModel> section of the Machine.config file are configured in the same way as they were in IIS 5.0 in the Machine.config or Web.config files. Upon completing the process described in this section, you will have a Web server running IIS 6.0 and hosting your ASP.NET applications. However, you can further configure the Web server to improve the security and availability of your ASP.NET applications. Deployment Process using IIS 6.0 The process for deploying new ASP.NET applications on a newly installed Web server requires no understanding of earlier versions of IIS or the .NET Framework. All the ASP.NET configuration sections in the Machine.config and Web.config files are configured the same way in IIS 6.0, except for the <processModel> section of the Machine.config file. When IIS 6.0 is configured to run in worker process isolation mode, some of the attributes in the <processModel> section of the Machine.config file are now in equivalent IIS 6.0 metabase properties. In addition, if your ASP.NET applications need to retain session state, you must configure IIS 6.0 to use the appropriate ASP.NET application session
Sikkim Manipal University Page No. 311

DOT Net Technologies

Unit 9

state method. Depending on the method you select, you might need to configure the ASP.NET state service or Microsoft SQL Server to act as the repository for centralized state storage. The process for deploying ASP.NET applications in IIS 6.0 is shown in Figure 9.2.

Figure 9.2: Deploying ASP.NET Applications in IIS 6.0

Note: Before deploying your ASP.NET applications on a production server, perform the process outlined in this section on a test server that is configured identically to your production server. Deploy the Web Server 1. Install Windows Server 2003. 2. Install and configure IIS 6.0. 3. Enable ASP.NET in the Web service extensions list. Install ASP.NET Applications 1. Create Web sites and virtual directories for each ASP.NET application by doing the following: Create Web sites and home directories. Create virtual directories.

2. Copy ASP.NET application content to the Web server.


Sikkim Manipal University Page No. 312

DOT Net Technologies

Unit 9

3. Enable common storage for ASP.NET session state by completing the following steps: Step-1: Select the method for maintaining and storing ASP.NET session state. Step - 2: If you have decided to maintain session state with the ASP.NET state service, configure out-of-process session state with the ASP.NET state service. Step - 3: If you have decided to maintain session state with SQL Server, configure out-of-process session state with SQL Server. Step - 4: Configure encryption and validation keys. Step - 5: Configure ASP.NET to use the appropriate session state. Step - 6: Secure the ASP.NET session state connection string. Complete the ASP.NET Application Deployment Ensure the security and availability of your ASP.NET applications. Verify that the ASP.NET applications were deployed successfully. Back up the Web server. Enable client access to your ASP.NET applications.

Deploying the Web Server (IIS 6.0) You must install the Web server before you can install your ASP.NET applications. In addition to installing Windows Server 2003, you must install and configure IIS 6.0 on the Web server. You must also enable ASP.NET so that the Web server can run ASP.NET applications.

Sikkim Manipal University

Page No. 313

DOT Net Technologies

Unit 9

Figure 9.3 below illustrates the process for deploying the Web server.

Figure 9.3: Deploying the Web Server

Installing Windows Server 2003 (IIS 6.0) The deployment process presented here assumes that you install Windows Server 2003 with the default options. If you use other methods for installing and configuring Windows Server 2003, such as unattended setup, your configuration settings might be different. Note: When you complete the installation of Windows Server 2003, Manage Your Server automatically starts. The deployment process assumes that you quit Manage Your Server, and then further configure the Web server in Add or Remove Programsin Control Panel. Installing and Configuring IIS 6.0 (IIS 6.0) Because IIS 6.0 is not installed during the default installation of Windows Server 2003, the next step in deploying the Web server is to install and configure IIS 6.0. The deployment process presented here assumes that you install IIS 6.0 with the default options in Add or Remove Programs in Control Panel. If you use other methods for installing and configuring Windows Server 2003, such as Manage Your Server, the default configuration settings might be different.

Sikkim Manipal University

Page No. 314

DOT Net Technologies

Unit 9

Install and configure IIS 6.0 by completing the following steps: Step 1: Install IIS 6.0 with only the essential components and services. As with installing Windows Server 2003, the primary concern when installing and configuring IIS 6.0 is to ensure that the security of the Web server is maintained. Enabling unnecessary components and services increases the attack surface of the Web server. You can help ensure that the Web server is secure by enabling only the essential components and services in IIS 6.0. Step 2: If you want to manage the Web site content by using Microsoft FrontPage, install FrontPage 2002 Server Extensions from Microsoft on the Web server. Enabling ASP.NET in the Web Service Extensions List (IIS 6.0) After you install IIS 6.0, you need to enable ASP.NET. You can enable ASP.NET in Add or Remove Windows Components, which is accessible from Add or Remove Programs in Control Panel. When you enable ASP.NET by using this method, ASP.NET is also enabled in the Web service extensions list. If you enabled ASP.NET in this way, then you can continue to the next step in the deployment process. ASP.NET is not Enabled ASP.NET might not be enabled in the Web service extensions list if either of the following is true: You installed a version of the .NET Framework and ASP.NET (other than version 1.1) from a Web download or as part of an application such as the Microsoft Visual Studio .NET development tool. You disabled ASP.NET in the Web service extensions list because you were not running ASP.NET applications on an existing Web server. If ASP.NET is not already enabled, view the Web service extensions list in IIS Manager and configure the status of the ASP.NET v1.1.4322 Web service extension to Allowed.
Sikkim Manipal University Page No. 315

DOT Net Technologies

Unit 9

Installing ASP.NET Applications (IIS 6.0) After the Web server is deployed, you can install your ASP.NET applications. First, you must create a Web site and virtual directories for each ASP.NET application. Then you need to install each ASP.NET application in the corresponding Web site and virtual directory. When there are provisioning or setup scripts for your ASP.NET applications, use these scripts to install the ASP.NET applications on the Web server. Because the provisioning and setup scripts create the Web sites and virtual directories while installing ASP.NET applications, you do not need to perform any manual steps to install the ASP.NET applications. In this case, run the provisioning or setup scripts to install and configure the Web sites and applications, and then continue to the next step in the application deployment process. Figure 9.4 below illustrates the process for installing your ASP.NET applications.

Figure 9.4: Installation Process for ASP.NET Applications

Creating Web Sites and Virtual Directories for each ASP.NET Application (IIS 6.0) For each ASP.NET application, you must create a virtual directory in a new or existing Web site. Later in the installation process, you will install your ASP.NET applications into their corresponding Web sites and virtual directories.
Sikkim Manipal University Page No. 316

DOT Net Technologies

Unit 9

Create the Web sites and virtual directories for your ASP.NET applications by completing the following steps: Create Web sites and home directories. Create virtual directories.

Creating Web Sites and Home Directories Using IIS 6.0 Each Web site must have one home directory. The home directory is the central location for your published Web pages. It contains a home page or index file that serves as a portal to other pages in your Web site. The home directory is mapped to the domain name of the Web site or to the name of the Web server. Create a Web site and home directory for an ASP.NET application by completing the following steps: Step 1: Create the folder that will be the home directory for the Web site on the Web server. The folder that is the home directory of the Web site contains all of the content and subdirectories for the Web site. The folder can be created on the same computer as the Web server or on a Universal Naming Convention (UNC)shared folder on a separate server. At a minimum, create the folder on the following: An NTFS file system partition, which helps ensure proper security. A disk volume other than the system volume, which reduces the potential of an attack on a Web site bringing down the entire Web server and improves performance. In a location that will not require requests for Web site content to contain /bin in the requested URL. As a security measure, ASP.NET returns a 404 error for all requests containing /bin in the requested URL. Step 2: Create the Web site on the server.

Sikkim Manipal University

Page No. 317

DOT Net Technologies

Unit 9

Step 3: If the Web site is FrontPage extended, then configure the Web site on the Web server to be FrontPage extended. Creating Virtual Directories (IIS 6.0) A virtual directory is a folder name, used in an address, which corresponds to a physical directory on the Web server or a Universal Naming Convention (UNC) location. This is also sometimes referred to as URL mapping. Virtual directories are used to publish Web content from any folder that is not contained in the home directory of the Web site. When clients access content in a virtual directory, the content appears to be in a subdirectory of the home directory, even though it is not. For security reasons, you might want to move the Web site content to a different disk volume during the application deployment process. You can move the content to another disk volume on the Web server or to a shared folder on a separate server. You can use virtual directories to specify the UNC name for the location where the content is placed, and provide a user name and password for access rights. For each virtual directory required by the ASP.NET application, create a corresponding virtual directory on the Web server by completing the following steps: Create the folder on the Web server to contain the virtual directory content. 1. Ensure that you create the folder in a secure manner that does not compromise the security of the Web server. 2. Create the virtual directory under the appropriate Web site on the server. Copying ASP.NET Application Content (IIS 6.0) When no installation program or provisioning scripts exist for your ASP.NET application, you can copy the content of the ASP.NET application to the corresponding Web site and virtual directories that you created on the Web server.
Sikkim Manipal University Page No. 318

DOT Net Technologies

Unit 9

You can copy the ASP.NET application content to the Web server by using one of the following methods: Run the Xcopy command to copy ASP.NET application content to the Web server on an intranet or internal network. Use Microsoft Windows Explorer to copy ASP.NET application content to the Web server on an intranet or internal network. Use the Copy Project command in Visual Studio .NET to copy ASP.NET application content to the Web server on an intranet or internal network, if the application has been developed by using Visual Studio .NET. Note: FrontPage Server Extensions must be installed on the Web server to use the Copy Project command. Use the Publish Web command in FrontPage to copy ASP.NET application content to the Web server on an intranet or over the Internet, if the Web site that contains the application has been developed using FrontPage. Enabling Common Storage for ASP.NET Session State (IIS 6.0) ASP.NET session state lets you share client session data across all of the Web servers in a Web farm or across different worker processes or worker process instances on a single Web server. Clients can access different servers in the Web farm across multiple requests and still have full access to session data. You can enable common storage for ASP.NET session state by performing the following steps: 1. Select the method for maintaining and storing ASP.NET session state. 2. If you have decided to maintain session state with the ASP.NET state service, configure out-of-process session state with the ASP.NET state service.
Sikkim Manipal University Page No. 319

DOT Net Technologies

Unit 9

3. If you have decided to maintain session state with SQL Server, configure out-of-process session state with SQL Server. 4. Configure the encryption and validation keys. 5. Configure ASP.NET to use the session state method that you selected in Step 1. 6. Secure the ASP.NET session state connection string in the registry

9.5 Summary
The IIS (Internet Information Services) is a web server provided by Microsoft. The IIS 6.0 provides integrated, reliable, scalable, secure, and manageable Web server capabilities over an intranet, the Internet, or an extranet. It introduces tp the reader the basic features of IIS and its

architecture. It describes the creation of application pools using IIS 6.0 with the help of other components in Visual Studio. It discusses the management of application pools in IIS 6.0. It also discusses the steps involved in deploying ASP.NET applications on IIS 6.0 Web Server. Self Assessment Questions 1. The ___________ component is a macro component that bundles the IIS components that are found in the Software\System\Networking & communications\Infrastructure directory in the component browser. 2. The ________ enables remote authors to create, move, or delete files, file properties, directories, and directory properties on your server over an HTTP connection. 3. You can use News Network Transport Protocol (NNTP) and ______ services to set up intranet news and mail services that work in conjunction with IIS. 4. The _______ feature in IIS does not support IPv6 addresses or IPv6 prefixes.

Sikkim Manipal University

Page No. 320

DOT Net Technologies

Unit 9

5. The ________ isolation mode enables you to completely separate an application in its own process, with no dependence on a central process such as Inetinfo.exe to load and execute the application. 6. An _______ is a group of URLs that are routed to one or more worker processes that share the same configuration. 7. With ________ mode, you can run applications that are incompatible with worker process isolation mode because they were developed for earlier versions of IIS.

9.6 Terminal Questions


1. Describe the features of IIS 6.0 (Refer to 9.1) 2. Discuss the following: (Refer to 9.2) IIS Architecture IIS Request Processing Models

3. Explain the process of deploying ASP.NET Applications (Refer to 9.4)

9.7 Answers to Self Assessment Questions


1. Internet Information Services technology (IIS) 2. Web Distributed Authoring and Versioning (WebDAV) 3. Simple Mail Transfer Protocol (SMTP) 4. IP Address Restrictions 5. Worker process 6. application pool 7. isolation mode

Sikkim Manipal University

Page No. 321