Click here to Skip to main content
Licence Ms-PL
First Posted 23 Oct 2009
Views 14,418
Bookmarked 24 times

Introduction to the Microsoft Web Platform

By | 30 Oct 2009 | Article
Provides an overview of the Microsoft Web Platform

Introduction

The MWP (Microsoft Web Platform) is composed of separate products that together provide a powerful foundation for building rich internet applications for large or small businesses. Microsoft offers free versions of these products in order for developers to start building rich web applications quickly. One simple downloadable installer installs the latest version of MWP, including framework, tools, server, database and more.

This white paper covers the:

  • Business benefits achieved using the MWP
  • Products and technologies included in the MWP
  • Procedures for deploying the MWP

This white paper assumes that readers are technical administrators or developers aware of Microsoft Windows Server, IIS, SQL Server, Visual Studio, ASP.NET and PHP.

The MWP begins with the Microsoft Web Platform Installer that installs IIS (Internet Information Server) running on a Windows Server operating system with the .NET Framework. IIS hosts ASP.NET to provide dynamic HTML and AJAX enabled web pages within each web site. Silverlight makes RIA (Rich Internet Applications) possible by pushing a small version of the .NET framework to any browser. SQL Server provides the database support for a web site. Both Visual Studio and Expression Studio provide all the tools needed to develop ASP.NET, AJAX and Silverlight enabled applications on the Microsoft Web Platform.

Benefits

Organizations looking to implement or improve their public and private web applications need to realize a bottom-line benefit to their day-to-day business functions. Some of these benefits are objective, such as the financial savings in the effort required to develop and support web-based solutions and the improvements in administrative and management efficiency. Other benefits are subjective, such as customer satisfaction.

The Microsoft Web Platform offers the following potential benefits:

  • Reduced deployment efforts
  • Reduced software platform costs
  • Reduced development efforts to build solutions
  • Reduced administrative effort to support solutions
  • Improved performance

Reduced Deployment Efforts

By using the Microsoft Web Platform Installer, you can automatically install all necessary platform and development products in one procedure.

Reduced Software Platform Costs

Implementing some or all of the free product editions reduces the platform cost to nearly zero. The free versions included in MWP are:

  • IIS (Internet Information Server)
  • ASP.NET and the rest of the .NET Framework
  • Visual Studio Web Developer
  • AJAX Extensions and Toolkit
  • Silverlight 3 Tools and Plug-In
  • SQL Server Express

Reduced Development Efforts to Build Solutions

The integration of Visual Studio and Expression Studio provides an easy way to implement server-side ASP.NET code and Silverlight design with client-side code in either product. Visual Studio is highly integrated with the .NET framework and SQL Server to provide a single development environment.

Reduced Administrative Effort to Support Solutions

One of the design goals for IIS 7.0 was to reduce the amount of administrative effort required to support Web sites and applications.

 
Migrating to IIS 7.0 reduced the administrative effort by:

  • Providing an improved configuration method. The applicationHost.config file is an .xml format file that contains the IIS 7.0 configuration settings. Because the file is in .xml format, it is easier to modify than the metabase in IIS 6.0 and is easier than making changes to the registry. Also, all of the configuration settings are stored in this file instead of being stored in multiple places in IIS 6.0 (such as the metabase, web.config file, or registry).
  • Supporting command-line-based deployments. IIS 7.0 includes a command-line-based deployment method that supports the automated installation of individual IIS 7.0 roles and features by using the ServerManagerCmd.exe tool. This method enables a fully automated installation of IIS 7.0 when an administrator is deploying a new Web server or is refreshing an existing Web server.
  • Taking advantage of the improvements in the new modular IIS 7.0 management console. The IIS 7.0 management console is more intuitive and task oriented than the management console in IIS 6.0.
  • Providing delegation of IIS 7.0 administration. An administrator can now delegate the administration of the IIS configuration settings, such as HttpErrors and HttpRedirect configuration settings, to application owners. This flexibility in configuration distributes the administrative effort and reduces the dependency on one individual or team to perform all administrative tasks.

Improved Performance

Using IIS 7.0 and Windows Server 2008 provides a 10 percent performance gain compared to IIS 6.0 and Windows Server 2003.

MICROSOFT WEB PLATFORM TOOLS

Background

Over the years, Microsoft has released many products and multiple versions of products to provide a wide variety of choices used to create unique web platforms for development. This continues to be possible.

In the past, an administration had to perform the following procedures individually:

  • Install IIS (Internet Information Server) 6.0 or 7.0
  • Install .NET Framework 2.0, 3.0 and/or 3.5 to provide ASP.NET support
  • Install Visual Studio 2005 or 2008
    • Install AJAX Extensions for Visual Studio 2005
    • Alternatively, install free Visual Studio Web Designer
  • Install Visual Studio 2008 SP1
  • Install Silverlight 3 Tools for Visual Studio 2008 SP1
  • Install SQL Server 2005 or 2008
    • Alternatively, install free SQL Server Express
  • Install Expression Studio 3
  • Install PHP for Windows

However, to make installation and deployment easier and simpler the Microsoft Web Platform Installer now provides a single procedure to install all necessary components for supporting rich web applications in a Windows Server environment.

Microsoft Web Platform Installer

Microsoft Web Platform Installer offers a single installer that provides the software you need to build and run a complete Web solution on the Microsoft Web platform.

ASP.NET

ASP.NET is a free powerful framework for building dynamic Web applications, whether it’s a small, personal Web site or a large, enterprise class Web application. ASP.NET is adaptable to a wide variety of projects and development styles. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications developers have access to the entire .NET Framework.

ASP.NET Web Forms
A page and controls framework that enables developers to build Web applications using encapsulated, UI functionality in easy-to-use, reusable common and user-defined controls. There are videos, tutorials, and articles on the www.asp.net web site that provides this information.

ASP.NET Dynamic Data
A data scaffolding framework that enables rapid development of functional, data-driven applications using ASP.NET Web Forms, and is based on a LINQ to SQL or Entity Framework data model. ASP.NET Dynamic Data brings major usability and RAD development changes to the existing ASP.NET data controls. For more information, see the ASP.NET dynamic data site http://www.asp.net/dynamicdata.

ASP.NET AJAX
A framework for quickly creating efficient and interactive Web applications that work across all popular browsers. ASP.NET AJAX offers:

  • Support for jQuery, a fast, concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.
  • Support for enhancements to existing pages using powerful AJAX controls with support for all modern browsers.
  • Access to remote services and data from the browser without tons of complicated JavaScript.
  • Improved efficiency and ease of use in Visual Studio 2008, with its built-in support for ASP.NET AJAX, improved JavaScript support, and a new Web page designer interface.

ASP.NET MVC
ASP.NET MVC is a free and fully supported Microsoft framework for building web applications that use a model-view-controller pattern. Like ASP.NET Web Forms, ASP.NET MVC is built on the ASP.NET framework.


ASP.NET MVC provides the following benefits:

  • Provides complete control over your HTML markup
  • Enables rich AJAX integration
  • Intuitive website URLs
  • Clear separation of concerns which results in web applications that are easier to maintain and extend over time.
  • Testability – including support for test-driven development.

For more information, see the ASP.NET MVC site http://www.asp.net/mvc.

Running ASP.NET Applications on IIS
ASP.NET integrates tightly for management, configuration, and request processing with IIS. Manage ASP.NET settings like .NET authorization rules and ASP.NET providers, through the IIS7 Management console. IIS7’s new distributed XML-based configuration system stores settings for IIS, ASP.NET and other components, such as FTP 7.0. For an overview of the new IIS7 configuration system, review Configuration System in IIS7. The IIS7 Configuration Reference itemizes and describes how to manage each element in the configuration system. The new integrated pipeline in IIS integrates the core ASP.NET runtime with the IIS request process pipeline; see How to Take Advantage of the IIS7 Integration Pipeline for more details.

Visual Studio

Visual Studio is the premiere integrated development environment for designing, developing, and testing next-generation applications and services. By improving the developer experience for the latest platforms – Windows, Web, Devices, and Microsoft Office – Visual Studio 2008 helps individuals and organizations rapidly create and deliver complete, connected, and compelling software solutions.

Visual Studio enables the creation of new Web experiences by empowering Web developers through simplifying Web development. Visual Studio 2008 gives developers the tools they need to build the next generation of Web experiences—both client-centric applications and Web services—more quickly, efficiently, and easily than ever before.

Teams targeting the Web can collaborate more effectively and obtain faster results by integrating the advanced designers and editors of the new Expression Studio tools into their development workflow, and by incorporating the broad functionality of Windows Live services into their solutions.

Visual Studio provides developers with all the tools and framework support required to create compelling, expressive, Web applications with “AJAX-style” interactive Web user interfaces. Developers can take advantage of these rich client-side and server-side frameworks to easily build client-centric Web applications that integrate with any back-end data provider, run within any modern browser, and have complete access to ASP.NET application services and the Microsoft platform.

As the concept of a Web service evolves, Visual Studio will enable developers to configure service endpoints, using the same tools and code regardless of wire protocol (HTTP or TCP/IP), to transmit messages and test the service without code. Developers and partners will be able to extend the underlying protocols to handle any definition of a Web service.

Developers can use RAD tools to quickly and easily create client connections and proxies to existing services, and test them without needing to write code.

Silverlight

Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, Python, and Ruby, and integrates with existing Web applications. Silverlight supports fast, cost-effective delivery of high-quality video to all major browsers running on Mac OS or Windows.

Silverlight compliments other Microsoft products such as ASP.NET, Windows Server and Windows Media to deliver unprecedented rich interactive web application experiences. Silverlight architecture is consistent with Web 2.0 paradigms and it enables enterprise web developers to extend their skills and deliver better experiences.

The following are benefits of deploying Silverlight:

  • Ability to offer and consume media as part of the web experience on Windows, Macintosh, and Linux operating systems
  • Simple integration with existing Web technologies and assets such as ASP.NET and SharePoint services
  • Better user experience for web application without deployment considerations

For more information on Silverlight, please visit: http://www.microsoft.com/silverlight.

PHP for Windows

The Microsoft Web Platform supports interoperability of PHP applications and solutions built on Windows. Many PHP developers currently use Windows for their development environment of choice, and with the Windows Web Application Gallery, PHP developers now can choose from numerous applications and solutions, built in PHP, that run well on Windows.

SQL Driver
The SQL Server Driver for PHP v1.0 is designed to enable reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. The Driver for PHP is a PHP 5 extension that allows the reading and writing of SQL Server data from within PHP scripts. It provides a procedural interface for accessing data in all Editions of SQL Server 2005 and SQL Server 2008 (including Express Editions).

FastCGI
The IIS FastCGI component enables popular application frameworks like PHP to be hosted on the IIS web server in a high-performance and reliable way. FastCGI helps these application frameworks to achieve improved performance on Windows over CGI, while allowing stable operation in production environments.

For more information on PHP for Windows, go to: http://www.microsoft.com/web/platform/phponwindows.aspx.

Expression Studio

Expression Studio is a suite of professional design tools for creative designers and developers who need to translate their vision into a tangible reality:

Expression Web A design tool used to create modern, high quality, and standards-based web sites.

Expression Web makes creating compliant standards-based Web sites faster and easier. With a state-of-the-art design surface that generates clean CSS, you can make design decisions on the fly, knowing that you're seeing a faithful representation of the final browser-rendered page.

Open and edit PHP pages directly in Expression Web and apply the full range of standards-based design tools to PHP including code coloring, snippets and IntelliSense. It also ships with a PHP development server that lets you test your PHP pages without any other external web server dependencies.

Expression Design An illustration and graphic design tool that lets you build compelling elements for both Web and desktop application user interfaces.

Expression Blend A design tool that harnesses the power of XAML, .NET, and Silverlight to create compelling user experiences for both the connected desktop and the web.

Expression Media An asset management tool to visually catalog and organize all your digital assets for effortless retrieval and presentation.

Expression Encoder A professional video encoder tool that offers enhancement, encoding, and publishing of rich video experiences.

Windows Live Platform

Windows Live Platform gives a deeper level of control by offering access to core services and data through open, easily accessible APIs. Now you can build applications and mash-ups (Web apps that combine multiple services within a single, easy-to-use interface) that unite your innovation with the power of Windows Live Services. Microsoft is providing APIs for core Live services - such as Windows Live Contacts, Windows Live Messenger, Live ID, Search, and Virtual Earth - so that you can access and use these services in the applications you create.

INSTALLATION

Planning the Installation

Before downloading and installing the Microsoft Web Platform, update the operating system that will host the MWP with the latest patches and fixes.

  • Choose a physical or virtual environment
  • Install one of the following operating systems
    • Windows XP SP2+
    • Windows Server 2003 SP1+
    • Windows Server 2008
    • Windows Vista SP1+
  • Run Windows Update to search for any critical updates and apply
    • If the updates are being applied to a newly installed operating system then be prepared to wait several hours for the updates to complete
  • Make sure you have administrative privileges on the machine
    • By default in Windows 2008 or Vista, you do not have administrative privileges logged on as a user other than the built-in Administrator account, even if the user is a member of the local Administrators group on the machine.
    • Make sure to either log on as the built-in Administrator account or explicitly invoke applications as the built-in Administrator using the "runas" command line tool or right-click an icon and select “Run as administrator”.

Running the Installation

Web PI (Microsoft Web Platform Installer) manages the installation.  

  1. Review the website for the Microsoft Web Platform at http://www.microsoft.com/web
  2. Download and run the free Web PI executable (wpilauncher.exe) from http://www.microsoft.com/web/downloads/platform.aspx
  3. The Web PI will display a Welcome screen with 3 vertical tabs on the left for:
    • What’s New?
    • Web Platform
    • Web Applications
  4. Select all the components of the MWP from each tab that you want to install
  5. Click the Install button
  6. Accept the licensing agreements when prompted.
  7. If you decided to install SQL Server Express then you should also select Windows Integrated Authentication when prompted.
  8. The Web PI queues up to 50 or more installations from just a few selected components.
    • Web PI may require one or more Reboots during installations.
    • Be prepared to wait over 2 hours until all installations complete.
  9. Run Windows Update to check for any additional updates to the MWP components and apply.
  10. Start developing your new web application right away.

Web Application Gallery

After installing the MWP components, return the Microsoft Web Platform web site at http://www.microsoft.com/web and select the Web App Gallery.

The Web App Gallery (http://www.microsoft.com/web/gallery ) takes the one-stop-shop concept another step further by providing ready-to-use web applications.

New ASP.NET and PHP web applications are being developed and added to the Web App Gallery on a regular basis. Some of the web applications you can download and use immediately include:

Subtext Subtext is a personal blog publishing platform that focuses on usability, elegance, and simplicity.

Moodle LMS Moodle is a Learning Management System (LMS) that provides educators with a comprehensive toolbox to create dynamic online courses. Moodle is open source and produced by a huge global community.

nopCommerce nopCommerce is a fully customizable shopping cart. A solution with comprehensive features that is easy to use for new online businesses, yet powerful enough for the most demanding e-commerce expert.

ResourceBlender.NET ResourceBlender.NET enables quick localization of an application. Translations can be re-used in different applications for export as .resx files, .properties and XUL/JS bundles. AJAX interface, XML Spreadsheet export and more.

Gallery A slick, intuitive web based photo gallery. Gallery is easy to install, configure and use. Gallery photo management includes automatic thumbnails, resizing, rotation, and more. Authenticated users and privileged albums make this great for communities.

Umbraco The friendly CMS that supports all modern browsers; users can edit with Word or LiveWriter; designers can create accessible and valid XHTML; developers can integrate any .NET control simply.

mojoPortal An easy to use, accessible, and standards compliant content management system and web application framework for ASP.NET 3.5, featuring Blogs, Forums, Event Calendar, Newsletter, Maps, ecommerce and more.

DotNetNuke Community Edition DotNetNuke is the ideal platform for building professional websites and web applications with dynamic content and interactive features.

WordPress WordPress is a state-of-the-art publishing platform with a focus on aesthetics, web standards, and usability.

Acquia Drupal Acquia Drupal provides the fastest on-ramp to build dynamic and social web sites featuring both editorial and user-generated content. Includes Drupal core with the most popular modules.

Share Your Web Application

You can also develop your own new web application and learn how the Microsoft Web App Gallery helps you share your web app with millions of Windows users by visiting http://www.microsoft.com/web/gallery/developer.aspx

  1. First, you need to determine if your web app meets the Windows Web App Gallery Principles. Your web app will need to adhere to a basic criteria for a quality user experience in the Gallery, such as support for the same Windows platforms as the Web PI and no harm to the user’s computer.
  2. You need to add support to your ZIP package for Web App Gallery so that we can simplify the installation of your app on Windows. This requires you to add 2 simple XML files to your application zip package. Read the Windows Web App Packaging Guidelines for a detailed walkthrough.
  3. Once you have determined that your web app meets the gallery's principles and you've created a compatible app package, you can now submit your web app using the online form available at http://www.microsoft.com/web/gallery/developer.aspx.

IMPROVEMENTS IN IIS 7.0

Compared to prior versions of IIS, IIS 7.0 has significant improvement in overall security, manageability and administration. IIS 7.0 also supports an improved delegation of administration model, which gives application and content owners more control to customize the user experience with their Web applications and content.

Improved Security IIS 7.0 includes many security-related improvements compared to previous versions of IIS. Security can be improved in IIS by:

  • Reducing the attack surface. IIS 7.0 provides detailed control over installing its features and components. Installing fewer role services reduces the attack surface of the computer running IIS.
  • Incorporating security features. In IIS 6.0, additional features and technologies improved security (such as URLScan). These security-related technologies have been integrated into IIS 7.0 and can be configured in the applicationHost.config file. This tighter integration provides improved security and ease of configuration.

Improved Monitoring and Problem Identification For large sites, real-time monitoring and root-cause identification of problems are an important requirement. Monitoring and problem identification are essential to helping ensure high uptime and optimal performance.

Using IIS 7.0 can improve monitoring and problem identification by:

  • Providing improved diagnostics and monitoring of Web sites. The Failed Request Tracing feature enables an administrator to capture a detailed trace of Hypertext Transfer Protocol (HTTP) requests in a XML-formatted log file. An administrator can configure the rules that determine which requests should be captured in the log by specifying parameters (such as file extension type, HTTP status code, time take, and unique URL) This feature helps administrators save time by not having to reproduce the problem before working on a solution. Administrators can also use the Appcmd.exe tool to view real-time information about current running HTTP requests.
  • Automating responses to events. An improved task scheduler in Windows Server 2008 can initiate tasks based on specified events. The tasks can automate recovery processes or send alert notification of an event.

Improving Configuration Control The IIS configuration settings are stored in the applicationHost.config file, which is a significant improvement over the metabase in prior version of IIS. An administrator updates a single version of the applicationHost.config file and then copies that version across all servers so that all servers are configured the same. This single version of the configuration file has helped reduce the time to troubleshoot site issues by dramatically reducing configuration-related issues.

An administrator saves the existing applicationHost.config file prior to any configuration change. This helps ensure that the team can quickly restore the previous configuration if an issue arises on the site after the deployment of an updated applicationHost.config file.

The documentation of configuration settings is necessary for any enterprise Web site. Because the applicationHost.config file is in XML format, it can be easily read and the site configuration settings are clearly documented.

Finally, the applicationHost.config file provides improved disaster recovery. If a catastrophic failure occurs on the site, an administrator has an easy and repeatable method for quickly recovering the site configuration settings.

Delegating Configuration to Application and Content Owners One of the features that will dramatically reduce the effort for operations is the delegation of many Web sites and application configuration settings to the application and content owners.

An administrator can enable the delegation of specific configuration settings, such as HttpErrors, HttpRedirect, and defaultDocument, on each site. The site or application owners can override the delegated configuration settings in the web.config files of their applications. This helps reduce the administrative burden on the site administrators and enables the application owners to customize the user experience. It takes careful planning to decide which settings to delegate per site.

For the complete list of settings that can be delegated, refer to the IIS.net site (http://www.iis.net). For more information about how to delegate configuration, refer to "How to Use Configuration Delegation in IIS 7.0" at http://learn.iis.net/page.aspx/157/how-to-use-configuration-delegation-in-iis-7/.

IMPROVEMENTS IN ASP.NET

Since its release, ASP.NET has been the platform of choice for developing web applications on the Windows / IIS platform. ASP.NET 2.0 took web application development to a new level, allowing developers to build more powerful applications faster than ever before.

IIS 7.0 takes ASP.NET further by integrating the ASP.NET runtime extensibility model with the core server. This allows developers to fully extend the IIS 7.0 server with the richness of ASP.NET 2.0 and the .NET Framework, instead of using the lower level IIS C++ APIs. Existing ASP.NET applications also immediately benefit from tighter integration using existing ASP.NET features like Forms Authentication, Roles, and Output Caching for all content.

While IIS 7.0 provides the improved ASP.NET integration by default, there is a choice: IIS 7.0 supports both the new and the old ASP.NET integration modes side by side on the same server.

This section discusses the improvements introduced by the new ASP.NET integration mode, the architecture of the two modes, and describes how to select and configure the integration modes for ASP.NET applications.

ASP.NET Enhancements on IIS 7.0
Better ASP.NET integration in IIS 7.0 both enhances existing applications, and allows new applications to take advantage of ASP.NET features in new ways:

  • ASP.NET services can be used for all content types. In the past, ASP.NET functionality such as Forms Authentication, Roles, URL Authorization, and Output Caching were only available to ASP.NET content types (ASPX pages, for example). Static files, ASP pages, and other content types could not benefit from these services.
In IIS 7.0, all ASP.NET services are provided uniformly to all content. For example, you can protect all of your web content, including images and ASP pages with your existing ASP.NET 2.0 access control solution built on ASP.NET Forms Authentication, Membership and Login controls.

  • Fully extend IIS with ASP.NET. Previous versions of IIS frequently required server extensibility to be developed using the native ISAPI filter or extension extensibility mode, due to the runtime limitations of ASP.NET.

IIS 7.0 allows ASP.NET modules to plug in directly into the server pipeline, with the same runtime fidelity as modules developed with the native (C++) server API. ASP.NET modules can execute in all runtime stages of the request processing pipeline, and be executed in any order with respect to native modules. The ASP.NET API is also expanded to allow more control over request processing then was previously possible.

  • Unified server runtime. Tighter ASP.NET integration also allows many of the features between IIS 7.0 and ASP.NET to be unified.

IIS 7.0 features unified configuration for IIS and ASP.NET modules and handlers. Many other features, including custom errors, and tracing, have been unified to allow better management and cohesive application design.

ASP.NET Integration Architecture In IIS 6.0 and previous releases, ASP.NET was implemented as an IIS ISAPI extension.

A request to an ASP.NET content type would be first processed by IIS, and then forwarded to the ASP.NET ISAPI DLL, which hosted the ASP.NET request pipeline and page framework. Requests to non-ASP.NET content, such as ASP pages, or static files, would be processed by IIS or other ISAPI extensions and were not visible to ASP.NET.

The major limitation of this model is the fact that services provided by ASP.NET modules, and custom ASP.NET application code, was not available to non-ASP.NET requests. In addition, ASP.NET modules were unable to affect certain parts of IIS request processing that occurred before and after the ASP.NET execution path.

In IIS 7.0, the ASP.NET request processing pipeline overlays the IIS pipeline directly, essentially providing a wrapper over it instead of plugging into it.

A request arriving for any content type is processed by IIS 7.0, with both native IIS modules and ASP.NET modules able to provide request processing in all stages. This enables services provided by ASP.NET modules like Forms Authentication or Output Cache to be used for requests to ASP pages, PHP pages, static files, and so on.

The ability to plug in directly into the server pipeline allows ASP.NET modules to replace, run before, or run after any IIS 7.0 functionality. This enables, for example, a custom ASP.NET basic authentication module written to use the Membership service and SQL Server user database to replace the built in IIS basic authentication feature that works only with Windows accounts.

In addition, the expanded ASP.NET APIs take advantage of direct integration to enable more request processing tasks. For example, ASP.NET modules can modify request headers before other components process the request, inserting an Accept-Language header before ASP applications execute in order to force localized content to be sent back to the client based on user preference.

Compatibility Most notably, the integrated architecture maintains the existing ASP.NET runtime architecture and APIs, allowing existing ASP.NET applications and services to work out of the box. With just a few modifications, they can be changed to take advantage of the new ASP.NET capabilities.

Likewise, developers can continue to write new applications to familiar ASP.NET APIs while harnessing the benefits of the runtime integration.

IIS 7.0 continues to provide the "Classic" ASP.NET mode for ASP.NET applications that have specific compatibility requirements not met by the Integrated mode. Administrators can select the desired integration mode per application pool, which enables applications using both the new and the Classic ASP.NET modes to function side by side on the same server.

Migrating ASP.NET Applications to IIS 7.0 Integrated mode On IIS 7.0, ASP.NET is configured to operate in the new Integrated mode by default. This enables your application to take advantage of Integrated mode enhancements with minimal modifications.

Because of the configuration unification, some applications may require migration in order to operate property in Integrated mode. By default, the server provides assistance with migration. It detects applications that require migration, and returns an error message requesting the application be migrated.

The following configuration causes the migration error:

  1. The application web.config file defines <httpModules> configuration. The application loads new ASP.NET modules, or removes existing ones. In Integrated mode, ASP.NET modules are specified together with native modules in the unified <system.webServer>/<modules> configuration section. The ASP.NET modules specified in the <system.web>/<httpModules> configuration section must be moved to the new configuration section in order to take effect. Subsequently, new ASP.NET modules must be added directly to the unified <modules> section.
  2. The application web.config file defines <httpHandlers> configuration. The application uses custom handler mappings for some content types. In Integrated mode, the ASP.NET handler mappings must be specified in the unified <system.webServer>/<handlers> configuration section in order to take effect. Subsequently, new ASP.NET handler mappings must be added directly to the unified <handlers> section. The section replaces both the ASP.NET <httpHandlers> configuration AND the IIS 7.0 scriptmaps configuration, both of which previously had to be configured in order to set up an ASP.NET handler mapping.
  3. The application web.config file defines
    <identity impersonate="true" /> configuration.
    The application impersonates client credentials (most common with intranet applications). In Integrated mode, client impersonation is not available in some early request processing stages. In the majority of cases, this is not a problem and you can turn off the error – otherwise, you must configure this application to run using the Classic ASP.NET mode.
When this error is generated, it can generally either migrate the application configuration (recommended in cases 1 and 2, above), or move the application to use Classic ASP.NET mode (in case 3).

Migrating the Application Configuration
IIS 7.0 takes care of migrating the application by using the APPCMD.EXE command line tool to perform the migration. The migration error message contains the command that is executed in command line window (which you must run--right click the Programs\Accessories\Command Prompt icon, and choose "Run as administrator") in order to instantly migrate your application to Integrated mode.

The basic format of the migration command is the following:

%windir%\system32\inetsrv\APPCMD.EXE migrate config <Application Path> 

Where <Application Path> is the virtual path of the application containing the site name, such as "Default Web Site/app1".

When migration is complete, your application runs in both Integrated and Classic modes without a problem.

Note: If you change the configuration after migration, the server will not prompt you to migrate again. After initial migration, you must make sure that your configuration remains in sync between the two modes – manually migrate the application again using the APPCMD.EXE command line tool.

Moving Back to Classic ASP.NET integration ModeIf you would rather return to the Classic ASP.NET mode, move your application to an application pool configured to run in Classic mode. Other applications continue running in the new Integrated mode side by side with the Classic mode application.

See Changing ASP.NET modes for an application for more information on moving an application to the Classic ASP.NET mode.

Disabling the Migration Error MessageIf you have manually migrated your configuration, or want to remain in Integrated mode without migrating your configuration (not recommended), disable the migration error message by adding the following to the application's web.config file:

<system.webServer>
	<validation validateIntegratedModeConfiguration="false" />
</system.webServer>

Note: The server automatically disables the error message after migrating the configuration with the APPCMD.EXE command line tool.

If you manually disable the migration error message, you must make sure that your application works properly in Integrated mode, as the server will no longer provide any warning regarding unsupported configuration mentioned earlier.

Changing ASP.NET Modes for an Application
If your application does not work properly in Integrated ASP.NET mode, move it to the Classic ASP.NET mode simply by moving it to another application pool.Each application pool is individually configured to use the desired ASP.NET integration mode. This allows you to run groups of applications using different ASP.NET integration modes side by side on the same server.

In order to change the ASP.NET integration mode for an application, do the following:

  1. Find or create an application pool that is configured to use the desired mode. By default, all new application pools on the system run in Integrated mode. ASP.NET setup does provide an application pool named "Classic .NET AppPool" that runs in the classic ASP.NET integration mode. You can use this application pool for applications that should not run in Integrated mode. You can also change the ASP.NET mode of the existing application pool either: using the IIS 7.0 Administration Tool, and the APPCMD.EXE command line tool; or, manually editing application pool configuration.
  2. Set the application to use that application pool. Each application is configured to use a particular application pool. By default, all applications use the default application pool named "DefaultAppPool", which runs in Integrated mode. You can change the application pool of an application either: using the IIS 7.0 Administration Tool, and the APPCMD.EXE command line tool; or, manually editing the application configuration.

Selecting ASP.NET Version for an Application
Historically, IIS has supported multiple versions of ASP.NET / CLR side by side-- for example, it enables the same server to run ASP.NET applications using .NET Framework v1.1 and v2.0. This support was provided by mapping a corresponding version of ASPNET_isapi.dll to serve requests for the ASP.NET content using the IIS 7.0 scriptmaps configuration.

For example, you could have the following script map configuration to enable side by side:

  1. ASP.NET v1.1 application on /app1:
    *.aspx -> d:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
  2. ASP.NET v2.0 application on /app2:
    *.aspx -> d:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
When a *.aspx request arrives to the application, IIS 7.0 loads the specified aspnet_isapi.dll, which loads the correct CLR version into the worker process, and process the request.

ASP.NET also provided the following ways to configure side by side scriptmaps:

  1. ASP.NET MMC extension. A user picks the version of ASP.NET to use, and the extension automatically configures the scriptmaps for the application to point to the right version of aspnet_isapi.dll.
  2. ASP.NET aspnet_regiis.exe. A user utilizes the –i, and –r options to install the scriptmaps pointing to the corresponding ASP.NET version.
Unfortunately, due to the limitation of the ability to load only one CLR version into a single worker process, the user must be careful to make sure that two applications using different versions are never configured to exist within the same application pool. With this common mistake, the first request would load the CLR of the corresponding aspnet_isapi.dll, and subsequent requests to the other version within the same application pool would fail.

IIS 7.0 recognizes that the application pool is the unit of ASP.NET versioning. As such, the version of the CLR / ASP.NET loaded in that application pool is explicitly configured in the application pool configuration. By default, IIS 7.0 pre-loads the CLR specified by this setting when loading the worker process (unless the version is configured to be empty).

Because application pools are the .NET Framework versioning boundary, the following are the options for changing the version of an ASP.NET application:

  1. Move the application to an application pool using the desired ASP.NET version. By default, applications use the default application pool named "DefaultAppPool", which runs ASP.NET v2.1 in Integrated mode. Move the application to the "Classic .NET AppPool" in order to run in ASP.NET v2.1 Classic mode, or another application pool of your choice.
  2. Configure the application pool within which the application is running to use the desired ASP.NET version. By default, all new application pools will be configured to run ASP.NET v2.1 in Integrated mode.

Note: Do not use aspnet_regiis /i or /r options to configure the version of ASP.NET for a particular application, or globally.

IIS 7.0 uses pre-conditioned handler mappings in order to automatically select the right set of handler mappings (to ASPNET_isapi.dll in Classic mode or managed handler types directly in Integrated mode) depending on the configured CLR version and managed integration mode of the application pool. The ASP.NET 2.0 setup installs these handler mappings at the server level.

Taking Advantage of Integrated ASP.NET Mode
On IIS 7.0, ASP.NET applications run in Integrated mode by default. However, in order to take advantage of the benefits provided by tighter integration, you must make some modification to application configuration. Further, you can develop new ASP.NET components that take advantage of the Integrated mode to provide powerful functionality to your application.

Additonal Resources for this Article

Please visit www.dotnet-u.com for more information. The links below target additional content to supplement this article:

FOR MORE INFORMATION

For more information about the Microsoft Web Platform and related products:

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

About the Author

dougturn


Microsoft
United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
General[My vote of 1] Not even informative PinmemberSAKryukov17:21 3 Nov '09  
GeneralMy vote of 1 Pinmemberpdear15:18 2 Nov '09  
GeneralMy vote of 1 PinmemberChamadness4:35 2 Nov '09  
GeneralMy vote of 1 PinmemberPaul B.11:32 26 Oct '09  
GeneralMy vote of 1 Pinmemberdigital man22:59 25 Oct '09  
GeneralMS Visual Studio will be completelly failure when my TQ Studio released by the next year end!!! Pinmembertq18:00 24 Oct '09  
GeneralMy vote of 1 PinmemberRozis14:08 24 Oct '09  
GeneralMy vote of 1 PinmemberRogic0:14 24 Oct '09  
GeneralMy vote of 1: thank you for this commercial PinmemberRozis14:13 23 Oct '09  
GeneralMy vote of 1 Pinmemberssteo20097:52 23 Oct '09  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 30 Oct 2009
Article Copyright 2009 by dougturn
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid