Welcome!

Silverlight Authors: Yung Chou, Keith Mayer, Kevin Benedict, Jayaram Krishnaswamy, Sandi Mappic

Related Topics: .NET, AJAX & REA, Silverlight

.NET: Blog Feed Post

Deploying ASP.NET Applications with IIS 7

With IIS 7, end users connect to an application by querying a site

The primary function of the Internet Information Server (IIS) is to host Web-based applications, such as ASP.NET. If you have to set your IIS 7 to host such an application, there are several terms you need to know and a procedure you have to follow. We will focus on them in this article.

In summary, with IIS 7, end users connect to an application by querying a site. Each site listens for clients’ requests through its bindings to virtual directories. Furthermore, each site is associated with a default, or root application, and one site may host many applications. Each application is also associated with an application pool. For each application pool there is at least one Worker Process (w3wp) and one application can be served by many Worker Processes (in a web garden). Now we’ll explain all of these terms one by one.

Virtual directories are paths in IIS that map to a physical location that stores files used by the application. Each application has at least one virtual directory, but creating more directories can be useful if you wish to use files outside of the default directory.

Bindings are combinations of sites and protocols on which they can serve requests. By default, IIS 7 supports bindings on ports 80 (HTTP) and 443 (HTTPS). However, you can also set custom ports for your applications.

Application pools are a security feature of IIS 7 allowing the separation of the applications. It allows an application in one pool to continue working in case an application from another pool fails. By isolating an application in one pool, you also can prevent it from accessing another application’s resources. Furthermore, you can enhance your server’s performance by assigning the most resource-consuming applications to their own application pools. This way, the performance of the other applications on the server won’t be affected.

Worker Process is a Windows process (w3wp.exe), which is responsible for handling web requests for a specific application pool. All the features of your ASP.NET applications are accessible through the use of the worker processes.

We call a web garden the situation when several worker processes are responsible for the same application pool. In this scenario, the load of the application is spread amongst multiple worker processes, and in the case of a single worker process failure, the remaining ones can continue to service application requests.

Now that we know all the terms, let’s focus on the process of deploying an ASP.NET application with IIS 7. The high-level steps are as follows:

  1. Publish the application from Visual Studio
  2. Copy the application to the default application folder (c:\intepub\wwwroot)
  3. Right-click the application’s folder in IIS Manager and click “ConvertToApplication”
  4. Set an application pool in the Application Pools node.
  5. Apply the pool to your application by right-clicking its node in the IIS Manager -> Manage Application -> Advanced Settings -> Application Pool
  6. Set the maximum number of Worker processes in the application pool if you intend to use web garden. You can do this by right-clicking the pool -> Advanced Settings -> Process Model -> Maximum Worker Processes.

Once you’ve deployed your application, it’s a good idea for you to monitor the IIS server for issues. You can do that easily with Monitis. Find out how here: http://blog.monitis.com/index.php/2011/06/25/monitoring-iis-with-vbscript-via-monitis/.

Read the original blog entry...

More Stories By Hovhannes Avoyan

Hovhannes Avoyan is the CEO of Monitis, Inc., a provider of on-demand systems management and monitoring software to 50,000 users spanning small businesses and Fortune 500 companies.

Prior to Monitis, he served as General Manager and Director of Development at prominent web portal Lycos Europe, where he grew the Lycos Armenia group from 30 people to over 200, making it the company's largest development center. Prior to Lycos, Avoyan was VP of Technology at Brience, Inc. (based in San Francisco and acquired by Syniverse), which delivered mobile internet content solutions to companies like Cisco, Ingram Micro, Washington Mutual, Wyndham Hotels , T-Mobile , and CNN. Prior to that, he served as the founder and CEO of CEDIT ltd., which was acquired by Brience. A 24 year veteran of the software industry, he also runs Sourcio cjsc, an IT consulting company and startup incubator specializing in web 2.0 products and open-source technologies.

Hovhannes is a senior lecturer at the American Univeristy of Armenia and has been a visiting lecturer at San Francisco State University. He is a graduate of Bertelsmann University.