Click here to Skip to main content
6,594,432 members and growing! (15,561 online)
Email Password   helpLost your password?
Web Development » ASP.NET » General License: The Code Project Open License (CPOL)

Deploying ASP. Net Websites on IIS 7.0

By Abhijit Jana

This article describe some Features and Architecture of IIS 7.0 and Deployment of ASP.Net Sites on IIS
Javascript, CSS, HTML, XHTML, ASP, ASP.NET, Ajax
Posted:19 Aug 2008
Updated:4 Sep 2008
Views:42,699
Bookmarked:80 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
59 votes for this article.
Popularity: 7.32 Rating: 4.13 out of 5
2 votes, 3.4%
1
4 votes, 6.8%
2
4 votes, 6.8%
3
5 votes, 8.5%
4
44 votes, 74.6%
5
IIS7.JPG

Introduction

  1. IIS 6.0 Vs IIS 7.0
  2. Where do I get IIS 7.0

Introduction to IIS 7.0

Microsoft Internet Information Services (IIS) 7.0 in Windows Server 2008 and Windows Vista provides a secure, manageable platform for developing and administrating and hosting Web applications and services. It has been completely redesigned and Restructured .IIS 7.0 provides features and functionality for administrators to effectively manage Web infrastructures; developers to rapidly build Web applications and services; and hosters to Web hosting .

IIS7_new.JPG

Features of IIS 7.0

Following are some features of IIS 7.0

  • IIS 7.0 provides features and functionality that enable administrators to reliably and effectively manage Web infrastructures.
  • IIS 7.0 has a distributed file-based configuration system that enables IIS settings to be stored in web.config files along with the ASP. NET settings.

  • IIS 7.0 provides a cost-effective, more scalable Web server platform for delivering reliable Web hosting to a broad set of customers.

Major innovations in IIS 7.0 :

  • A modular, extensible core Web server

  • A unified, distributed file-based configuration system

  • Integrated health monitoring and diagnostics

  • A set of new administration tools with delegation support

    For More Features and Product Understanding Check Here

Basic Architecture of IIS 7.0

Following Diagram are showing the Overall Architecture of IIS 7.0 Which Contain HTTP.Sys, SvcHost.exe,Application Pool and Worker Process(W3Wp).

II7_Archi.JPG

Main Components of IIS 7.0 are HTTP.Sys, Svchost.Exe, Application Pool , Worker Process (W3WP.exe) and Configuration Store. HTTP.Sys : It the Kernel mode Protocol stack which listen the HTTP and HTTPS Request. W3SVC and WAS are the part of Svchost.exe . W3SVC is the Listner of Request from kernel mode that passed by the HTTP.Sys. W3SVC also interact with Windows Activation Process Which is Managed the Worker Process by Starting , Stopping and Recycling the Application Pool . WAS also Responsible for Health Monitor of Application Pool during Runtime. Configuration Store All web.config and Asp.Net Setting and other configuration in XML Hierarchy form. W3wp.exe is a long-running process that processes requests and generates responses.


Following Diagram Shown you the Process Flow of IIS 7.0. This the flow of User Request to IIS and Get the Response from IIS.

ProceessFlowofIIS.JPG

User Request Pass From Kernel Level To User Level Via Http.Sys. And the passes to svchost, and then goes to Application Pool.

For more Details Please Click Here

How To Deploy ASP. Net Websites on IIS 7.0

From Now onward I will describe one Example To deploy your ASP.Net websites on IIS 7.0 .
Step 1: From Visual Studio Published Your Web Application .
Step 2: Copy The Published Application Folder to "C:\intepub\wwwroot" [default] Folder.
Step 3: From RUN - > inetmgr -> OK
Following Screen Will Come . This is the main Page for Any Application. There are Three Panel.

Main_DefaultIIS.JPG

"TestWeb" is recently pasted webapplication on your wwwroot folder.
Step 4 : We need to Convert it to Application , just RightClick and and Then Click on "ConvertToApplication" as Following picture

ConvertToApplication.JPG

After Converting it to Application its icon will be changed and then you can set the property for your web application from middle pane. you can set IIS Authentication Mode, Default Page Just like IIS 6.0

ConvertedToApplication.JPG

You can Change Security Settings on Authentication Section. Bydefault Setting will be set from your web.config itself. As in my web.config Form Authentication was set that's why, Forms Authentication has been Enabled. if we want to change the Status just double click and update status to Enabled to Disabled or Vice Versa.

AuthenticatinSettings.JPG

Now one most important part to Set Application Pool for you application.

How To Create Application Pool

A site can contain many applications including that site’s default application, which is called the root application. In addition to belonging to a site, an application belongs to an application pool, which isolates the application from applications in other application pools on the server .

Step 1: Right Click on Application Pool and Give the Name of your Pool here i have given "pool" and select Framework and click on OK

PoolCreation.JPG

Step 2 : if you are writting some thing on server [ May be writes Error Events Logs ] , you need to Change the Pool Identity to Local System . Right Click on Pool Identity set seeting as following image

There are Three Identity of Application Pool

  • Network Service
  • Local Service
  • Local System

changePoolIdentity.JPG

Assign Application Pool To Your Application

Now , we need to assign the Application Pool to our web application

Step 1: Right Click on "TestWeb" Application and Select "Advanced Settings"

asingAppPool.JPG


Step 2: Finaly Assign Your Created Application Pool "pool" to "TestWeb" Application.

FinalAppPoolAsign.JPG


Now you can run your application by just typing http:\\localhost\testweb and it can be accessable on network by ip also.

Configure Web Gardens in IIS 7.0

I have split this section with some Parts , these are

Application pools used to separate set of IIS worker processes that share the same configuration. Application pools enable us to isolate our web application for better security, reliability, and availability. The worker process serves as the process boundary that separates each application pool so that when one worker process or application is having an issue, other applications or worker processes are not affected.

aPPpIOOL.JPG

Fig : Application Pool With Worker Process On IIS Server

In your IIS there may be more than on Web sites hosted and by creating Application Pool , you can just Assign a Separate Worker Process to your application. I have already discussed how you can assign Application Pool To your web application

Type of Application Pool :

There are Two Predefined Applocation Pool is IIS 7.0

  1. DefaultAppPool (Integrated)
  2. ClassicAppPool

None of Application Pool Installed bydefault when IIS 7.0 is installed. Classic Application Pool is installed when Asp.Net 2.0 is installed in the System

Identity Of Application Pool :

Application pool identity configuration is an important aspect of security in IIS 7.0, because it determines the identity of the worker process when the process is accessing resource. This Settings comes form IIS 6.0. in IIS 5.0 There Application pool runs under the local system account. In IIS 7.0 there are Three predefine Identity , that are same with IIS 6.0

Applicationpool Identity

Description

LocalSystem

LocalSystem is a built-in account that has administrative privileges onthe server. It can access both local and remote resources

LocalServices LocalServices Built-in account has privileges of an authenticated local user account . It does not have any network access permission
NetworkServices This is the default Identity of Application Pool NetworkServices has privileges of authenticated local user aaccount and it can have access remote resource as machine account.

How To Create An Application Pool and Assign It to a Web Application?

This has been already discussed

Creating Application Pool And Assign it to a Web Application

What is Web Gardens ?

By default Each Application Pool runs with a Single Worker Process (W3Wp.exe) . We can Assign multiple Worker Process With a Single Application Pool. An Application Poll with multiple Worker process called "Web Gardens" . Many worker processes with same Application Pool can sometimes provide better throughput performance and application response time. And Each Worker Process Should have there own Thread and Own Memory space.

WEb_Garden.JPG

Fig: General Block Diagaram of Web Garden

As Given in Picture, in IIS Server there may be multiple Applicationpool and each application pool having at least a single Worker Process. Web Garden should contain multiple Worker process.

There are some Certain Restriction to use Web Garden with your web application. If we use Session Mode to "in proc" , our application will not work correctly because session will be handled by different Worker Process. For Avoid this Type of problem we should have to use Session Mode "out proc" and we can use "Session State Server" or "SQL-Server Session State".

Main Advantage : The worker processes in a Web garden share the requests that arrive for that particular application pool. If a worker process fails, another worker process can continue to process requests.

How To Create Web Garden ?

Create a New Application Pool. Right Click -> Advance Setting -> Go To Process Model Section , Set the Value for Maximum Worker Process

IIS_Update.JPG

Is It Recommended to use Web Garden ?

It not always recommended to use Web Garden To Your Application affects to performance of your sites except in very specific cases like some long running Synchronous request or Application is very unstable .

IIS 6.0 Vs IIS 7.0

Main Advantages of IIS 7.0 is Modular Design. Which gives some benefits fo to IIS 7.0 over IIS 6.0. Followin table showing you some difference of IIS 6.0 and IIS 7.0 .

Features

IIS 6.0

IIS 7.0

Architecture Monolithic Modular
Setup Most Features Installed Minimum installtion based on role
Extended Features ISAPI Filter and ISAPI Extention Added Module and handler in managed or native code
Customize UI Normal Customize for .NET

There are many more Difference are There.

Where Do I Get IIS 7.0

IIS 7.0 Will Not available with All Operating System . There are some Specific OS and Specific Version For IIS 7.0 .

Operating System With Edition Available

Windows Server 2008 Yes
Windows Vista (Home Basic) No (Default) Need to be Install
Windows Vista (Home Premium) No (Default ) Need to be install
Windows Vista (Business) Yes
Windows Vista ( Ultimate ) Yes

Reference

IIS Resource

IIS Learn

History

  • 08/20/2008:
    • Article Published
  • 08/28/2008:
    • Added Section : Web Garden on IIS 7.0
    • Modified Some Text

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Abhijit Jana


Member
Abhijit has done Master Degree in Computer Application from Heritage Institute of Technology (HIT-K) ,Kolkata, West Bengal, India . He is an interested, committed, creative Software professional having more than 2.8 years of solid experience in web-based and windows based solutions in Microsoft Technologies using .NET 2.0, .NET 3.0 , .NET 3.5, ASP.NET 2.0, ASP.NET 3.5 C# 2.0, AJAX, Silverlight, Web Services, MS SQL Server 2005, Exchange Server, Active Directory, and Dot Net Nuke (DNN),Win Forms, WinServices, WSS (Windows Sharepoint Server 3.0 ), WPF, WWF. He is also an MCP (Microsoft Certified Professional) and MCTS (Microsoft Certified Technology Specialist) on Web Development. He has good knowledge of Object Oriented Programming, 3-Tier Architecture and Design Patterns as well as good command over IIS (IIS 5.1,IIS 6.0, IIS 7.0) and deployment of Application on Live Production Environment . His hobbies, listing to music and Developing Own small Tools Utilities and Knowledge sharing.


Awards
CodeProject MVP 2009
Prize winner "Best ASP.NET article of Sep 2009
Prize winner "Best ASP.NET article of July 2009
Prize winner "Best ASP.NET article of June 2009"
Prize winner "Best ASP.NET article of January 2009"
Prize winner "Best ASP.NET article of November 2008"

Prize winner "Best ASP.NET article of October 2008"

Abhijit's CodeProject Guru :

Occupation: Software Developer
Location: India India

Other popular ASP.NET articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 33 (Total in Forum: 33) (Refresh)FirstPrevNext
GeneralERROR WHILE DEPLOYING DOT NET 2.0 WEBSITE... PinmemberMember 402573911:44 18 Sep '09  
GeneralQueries regarding Hosting PinmemberTrupti Mehta4:38 10 Aug '09  
GeneralError from asp.net deployment on IIS 7 Pinmemberopunarcisse4:33 20 Jul '09  
GeneralRe: Error from asp.net deployment on IIS 7 PinmvpAbhijit Jana0:44 22 Jul '09  
GeneralRe: Error from asp.net deployment on IIS 7 Pinmemberopunarcisse9:41 29 Jul '09  
GeneralDeployment of ASP.NET website Pinmembercwleecw22:42 19 Jul '09  
GeneralRe: Deployment of ASP.NET website PinmvpAbhijit Jana22:50 19 Jul '09  
GeneralRe: Deployment of ASP.NET website Pinmembercwleecw23:03 19 Jul '09  
GeneralRe: Deployment of ASP.NET website Pinmembercwleecw19:50 20 Jul '09  
GeneralRe: Deployment of ASP.NET website PinmvpAbhijit Jana0:37 22 Jul '09  
GeneralIIS6 Pinmembermbaocha11:19 3 May '09  
GeneralRe: IIS6 PinmvpAbhijit Jana20:12 3 May '09  
GeneralQuestions PinmemberMohammed Gouda1:32 22 Dec '08  
GeneralQuestion re: Server 2008 Pinmemberglennforum6:23 18 Sep '08  
GeneralNice and helpful Pinmemberaspnet8818:45 4 Sep '08  
GeneralRe: Nice and helpful PinmemberAbhijit Jana18:59 4 Sep '08  
GeneralReally nice PinmemberMohammed Ali Babu19:15 1 Sep '08  
GeneralRe: Really nice PinmemberAbhijit Jana19:17 1 Sep '08  
GeneralVista Home Premium PinmemberMarionN11:45 30 Aug '08  
GeneralRe: Vista Home Premium PinmemberAbhijit Jana22:31 30 Aug '08  
GeneralSomething to add - Web Gardens Pinmemberrobvon12:16 26 Aug '08  
GeneralRe: Something to add - Web Gardens PinmemberAbhijit Jana18:49 26 Aug '08  
GeneralWeb Gardens -Added PinmemberAbhijit Jana18:46 27 Aug '08  
GeneralGood one PinmemberN a v a n e e t h19:47 24 Aug '08  
GeneralRe: Good one PinmemberAbhijit Jana19:58 24 Aug '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 4 Sep 2008
Editor:
Copyright 2008 by Abhijit Jana
Everything else Copyright © CodeProject, 1999-2009
Web20 | Advertise on the Code Project