Thursday 26 July 2012

How to install ASP.NET 1.1 with IIS7 on Windows 2008


Overview

You can use the Web Platform Installer (Web PI) to easily install IIS, and applications that run on IIS. The Web PI is a free, lightweight tool that lets you install IIS and related technologies such as ASP.NET, SQL Server Express, Visual Web Developer, other popular Web applications, and more. Because the Web PI references and links to the latest versions of available Web Platform offerings, with just a few simple clicks you can download and install any new tools or updates.
You can also install ASP.NET 2.0 (3.0 and 3.5) using the Windows Vista and Windows 2008 user interface - just install the ASP.NET component located under IIS->Word Wide Web Services->Application Development Features.  You can find this set of components in Windows 2008 by clicking Start, and click Server Manager.  Expand the left-hand treeview in Server Manager and click Manage Roles, and then Web Server (IIS).  In the right-hand pane look for an option that says Add Role Services.  If you're on Windows Vista, click Start, click Control Panel, click Programs, and then Windows Features.  Look for the following tree of features under Internet Information Services (IIS):
ASP.NET 1.1 is not included in Windows Vista or Windows 2008 and must be downloaded and installed manually.  This post shows you how:

Step 1: Install "IIS Metabase Compatibility"

The IIS7 "Metabase compatibility" component is required to successfully install ASP.NET 1.1. 
To install it on Windows 2008 Server, click Start, and click Server Manager.  Expand the left-hand treeview in Server Manager and click Manage Roles, and then Web Server (IIS).  In the right-hand pane look for an option that says Add Role Services.  This takes you to wizard where you can install "IIS Metabase Compatibility".  
If you're on Windows Vista, click Start, click Control Panel, click Programs, and then Windows Features.  Look for Internet Information Services (IIS) and install "IIS Metabase Compatibility".

Step 2: Install the .NET Framework v1.1 and .NET Framework v1.1 SP1

Install Framework v1.1, SP1, and ASP.NET's security update to SP1:
When you install .NET Framework Version 1.1, and SP1 for .NET Framework Version 1.1, you'll see the following dialog.  Click Run program.
note: If you do not install Framework v1.1 SP1, you may run into Data Execution Prevention errors with messages like "IIS Worker Process has stopped working".  This is expected.  Installing .NET Framework v1.1 SP1 will fix this.

Step 3: Enable ASP.NET v1.1 ISAPI Extension

Enable ASP.NET v1.1 ISAPI as an allowed ISAPI extension.  To do this, open "IIS Manager" administration tool.  In the features view, click on the "ISAPI and CGI Restrictions" feature.  In the actions pane, click "add"
Extension: C:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
note: change drive if your system drive is not C:\
Description: ASP.NET v1.1 
You can also do by running the following command line:
%windir%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -enable

Step 4: Add IgnoreSection Handler to v1.1 machine.config

ASP.NET v1.1 will throw runtime exceptions out of the box if you have IIS configuration in the web.config files that are read by your ASP.NET v1.1 applications.  To make ASP.NET v1.1 ignore IIS configuration sections, open the Framework v1.1 machine.config file (%windir%\Microsoft.NET\Framework\v1.1.4322\config\machine.config) and add the following section entry just above the bottom tag for the <configSections> element:
<section name="system.webServer" type="System.Configuration.IgnoreSectionHandler,
    System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>


Step 5: Move Site or Application to ASP.NET 1.1 Application Pool

During installation, Framework v1.1 creates an application pool called "ASP.NET 1.1" that is configured to load Framework v1.1 upon startup.  To move your site or application into this application pool using IIS Manager. You can also do this from the command line by navigating to the %windir%\system32\inetsrv directory and running the following command line:
appcmd set app "Default Web Site/" /applicationPool:"ASP.NET 1.1"If you would like to create a new application pool that's configured to load Framework v1.1.  You can also do this from the command line by navigating to the %windir%\system32\inetsrv directory and running the following command line:
appcmd add apppool /name:"NewPool"  /managedRuntimeVersion:"v1.1"



Translate .htaccess Content To IIS Web.config


Introduction:


Many PHP applications are distributed with configuration files for the Apache Web server. These configuration files (usually called .htaccess files) contain a number of settings that can be used for integrating the application with the capabilities of the Web server.

IIS 7 uses a file called Web.config to hold settings for integration with applications. The Web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application-specific items such as database connection strings.

This article describes the most common uses of the .htaccess file by PHP applications, and shows how to use the Web.config file for these same functions in IIS.


Sample Application Configuration Files:


The following examples are two configuration files for a sample application: an .htaccess file and a Web.config file.


Sample Application .htaccess File:

#
# Apache/PHP/Application settings:
#



# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>


# Don't show directory listings for URLs which map to a directory.
Options -Indexes


# Follow symbolic links in this directory.
Options +FollowSymLinks


# Make Application handle any 404 errors.
ErrorDocument 404 /index.php


# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php


# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.



# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>


# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>


# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On


# Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

# Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>


# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on



  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Application in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/application uncomment and
  # modify the following line:
  # RewriteBase /application
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $


Sample Application Web.config File:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>


<configSections>
        <sectionGroup name="system.webServer">
            <sectionGroup name="rewrite">
                <section name="rewriteMaps" overrideModeDefault="Allow" />
                <section name="rules" overrideModeDefault="Allow" />
            </sectionGroup>
        </sectionGroup>
    </configSections>


<system.webServer>
        <security>
            <!--  This section should be uncommented after
            installation to secure the installation. -->
            <!--
            <requestFiltering>
                <denyUrlSequences>
                    <add sequence="engine" />
                    <add sequence="inc" />
                    <add sequence="info" />
                    <add sequence="module" />
                    <add sequence="profile" />
                    <add sequence="po" />
                    <add sequence="sh" />
                    <add sequence="theme" />
                    <add sequence="tpl(\.php" />
                    <add sequence="Root" />
                    <add sequence="Tag" />
                    <add sequence="Template" />
                    <add sequence="Repository" />
                    <add sequence="code-style" />
                </denyUrlSequences>
                <fileExtensions>
                    <add fileExtension=".sql" allowed="false" />
                    <add fileExtension=".pl" allowed="false" />
                </fileExtensions>
            </requestFiltering>
            -->
        </security>
        <directoryBrowse enabled="true" />
        <caching>
            <profiles>
                <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
                <add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00:00" />
            </profiles>
        </caching>
        <rewrite>
            <rules>
                <rule name="block favicon" stopProcessing="true">
                    <match url="favicon\.ico" />
                    <action type="CustomResponse" statusCode="404" subStatusCode="1" 
                        statusReason="The requested file favicon.ico was not found" 
                        statusDescription="The requested file favicon.ico was not found" />
                </rule>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^example\.com$" />
                    </conditions>


<action type="Redirect" redirectType="Permanent" url="http://www.example.com/{R:1}" />
                </rule>
                <rule name="Imported Rule 2" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
        <defaultDocument>
            <files>
                <remove value="index.php" />
                <add value="index.php" />
            </files>
        </defaultDocument>


<!-- HTTP Errors section should only be enabled if the "Error Pages"
        feature has been delegated as "Read/Write" at the Web Server level.
           <httpErrors>
               <remove statusCode="404" subStatusCode="-1" />
               <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
           </httpErrors>
        -->


</system.webServer>
</configuration>



Request Filtering:



This application uses the FilesMatch directive in the .htacess file to limit browser access to files that are components of the application.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>



IIS 7 uses the Request Filtering module to limit browser access to files that are components of the application. For the sample application in a Web.config file, the section could look like:
       <security>
            <requestFiltering>
                <denyUrlSequences>
                    <add sequence="engine" />
                    <add sequence="inc" />
                    <add sequence="info" />
                    <add sequence="install" />
                    <add sequence="module" />
                    <add sequence="profile" />
                    <add sequence="po" />
                    <add sequence="sh" />
                    <add sequence="theme" />
                    <add sequence="tpl(\.php" />
                    <add sequence="Root" />
                    <add sequence="Tag" />
                    <add sequence="Template" />
                    <add sequence="Repository" />
                    <add sequence="code-style" />
                </denyUrlSequences>
                <fileExtensions>
                    <add fileExtension=".sql" allowed="false" />
                    <add fileExtension=".pl" allowed="false" />
                </fileExtensions>
            </requestFiltering>
        </security>



Note that you can leave this section commented out for installation, because the installation scripts are blocked by this filter.


An alternative to using the request filtering is to use the URL Rewriter module to return a 403 error for any of the matching file types. The advantage of the URL Rewriter module is that it uses a regular expression for the match.


<rule name="Protect files and directories from prying eyes" stopProcessing="true"> 
                <match url="\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$" /> 
                <action type="CustomResponse" statusCode="403" subStatusCode="0" 
                    statusReason="Forbidden" 
                    statusDescription="Access is forbidden." /> 
        </rule>



Default Document:



In the .htaccess file for the sample application, the DirectoryIndex directive tells the Web server which file to load if no filename is included with the URL.
# Set the default handler.
DirectoryIndex index.php


For IIS 7, the default document should be set up as high in the Web site hierarchy as the Module Handler. For example, with PHP, the Module Handler is usually set at the Web server level. The default document should be set at that level also, rather than locally within a Web site’s context. The following code within your Web.config file can ensure this:
        <defaultDocument>
            <files>
                <remove value="index.php" />
                <add value="index.php" />
            </files>
        </defaultDocument>




URL Rewriting:

IIS 7 includes the URL Rewrite module. You can use this extension to provide rules for IIS to rewrite incoming URL requests. The most common use of URL Rewriting is to provide shorter, easy-to-remember URLs.


Many PHP applications currently ship with rewrite rules as part of their .htaccess file. These rules tell Apache’s mod_rewrite how and when to rewrite incoming requests. The IIS 7 URL Rewrite module can read these rules and translate them into URL Rewrite rules.


For the sample application, the relevant mod_rewrite rules in the .htaccess file are:
  RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


The IIS URL Rewriter module can read these rules and translate them. The translated URL Rewriter rules are:
<rewrite>
  <rules>
    <rule name="Imported Rule 1" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="^example\.com$" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="http://www.example.com/{R:1}" />
    </rule>
    <rule name="Imported Rule 2" stopProcessing="true">
      <match url="^(.*)$" ignoreCase="false" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
        <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
      </conditions>
      <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
    </rule>
  </rules>
</rewrite>



Error Page Redirects/Handling:

Some applications handle standard errors within the scope of the application. The ErrorDocument directive in the .htaccess file of the sample application tells the Web server to load the home page for any 404 or “File Not Found” errors.
# Make Application handle any 404 errors.
ErrorDocument 404 /index.php


IIS uses the httpErrors directive for this functionality. However, because the capability to set this at the application level is turned off by default for IIS, this section should be commented out.
        <!-- HTTP Errors section should only be enabled if the "Error Pages"
        feature has been delegated as "Read/Write" at the Web Server level.
           <httpErrors>
               <remove statusCode="404" subStatusCode="-1" />
               <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
           </httpErrors>
        -->


Directory Browsing:

Another application security (or integrity) measure often implemented is disabling directory browsing from the clients. Many Web server configurations will let users see a listing of files in a directory that does not contain one of the default document files. In the .htaccess file of the sample application, this is disabled using the Options directive:
# Don't show directory listings for URLs which map to a directory.
Options -Indexes


IIS limits this access in the Web.config file using the directoryBrowse directive:
        <directoryBrowse enabled="false" />



Cache Aging:

Caching directives are used to ensure that static content is cached for a period of time, and dynamic content is not cached at all. In the .htaccess file of the sample application, the ExpiresBy directives provided by mod_expires module are used.
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On


# Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

# Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>


In the Web.config file, IIS uses the Output Caching module and the caching directive to control caching. For the sample application, you can enable caching for .html files for a maximum of 14 days. For .php files, ensure that no caching is performed at all with the code:
        <caching>
            <profiles>
                <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
                <add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00:00" />
            </profiles>
        </caching>

Saturday 21 July 2012

Using the Microsoft Web Platform


Introduction

The Microsoft® Web Platform Installer (Web PI) makes it easy for you to download, install, and keep up to date on the latest software components of the Microsoft® Web Platform for development and application hosting on the Windows® operating system. Web PI does the work of comparing the newest available components across the Microsoft Web Platform against what is already installed on your computer; you can see what is new and what you haven’t yet installed. You can use Web PI to learn more about different components and install one or more components in a chained installation, with Web PI handling reboots and logging failures where applicable. The currently available software components include Microsoft WebMatrix, Internet Information Services 7 (IIS 7), the latest versions of PHP 5.2 and PHP 5.3, Microsoft® SQL Server® 2008 R2 Express, the Microsoft®.NET Framework, and Microsoft®Visual Web Developer 2010 Express Edition with Service Pack 1.
Web PI also provides an interface to the Windows Web App Gallery, a community-driven hub of the most popular open-source and community Web applications that run on Windows. Accessible from anywhere through the Microsoft Web Platform site, the Windows Web App Gallery provides a streamlined way for users to explore, discover, and install Microsoft® ASP.NET, PHP, and other types of Web applications for the Windows operating system, providing Web developers with access to millions of Web users worldwide. The Windows Web App Gallery lets developers submit their own applications for inclusion; once accepted, a Web application can appear in Web PI for anyone to download.
System requirements for Web PI include an Internet connection and one of the following supported operating systems:
  • Windows Server® 2008 R2 or Windows Server® 2008
  • Windows Server® 2003 Service Pack 2 (SP2)
  • Windows Vista® Service Pack 2 (SP2)
  • Windows® XP Service Pack 3 (SP3)
  • Windows® 7

Web PI for Hosters

Web PI can help in the following scenarios:
  • Building reference machines used for the creation of images for dedicated or virtual dedicated offerings.
  • Building the Web Server reference machine for a shared hosting environment.
  • Updating existing machines with the latest components.
  • Deploying an internal development or testing environment.
  • Referring customers to use Web PI to setup their own dedicated machines or local environments for development and testing before deploying to hosted environments.

Web PI for Web Hosting Customers

Web PI can help in the following scenarios:
  • Deploying a development environment with the entire Web Platform stack of components. Includes the latest Web, database, and development tools and technologies.
  • Updating the development environment with the latest components.
  

Install the Web Platform

Web PI automates the discovery and installation of the Microsoft Web Platform, which includes the Web Server, Frameworks and Runtimes, Database, and Tools sections. In version 3.0, the Microsoft Web Platform also installs the latest 5.2 and 5.3 versions of PHP.
Download Web PI.  WebPI starts up on the "Spotlight" tab, where we highlight products and applications that we think will be the most interesting for our users 



Figure 1: “WebPI Spotlight” tab


WebPI seperates the components you can install into two main categories:  Products and Applications.  In the Products tab, you will find all the components you need to build and maintain your web sites.  The Applications tab is home to our wide collection of open-source applications that you can use as a great starting place for developing your sites 
The “Products” tab shows the four main components: Server, Frameworks, Database and Tools.
Figure 2: “Products” tab

Server

The Internet Information Services (IIS) Web server ships in the Windows client and server operating systems, providing a secure, easy-to-manage Web platform for reliably hosting rich Web applications and Web services.
As of the IIS 7.0 release (which shipped in Windows Server 2008), IIS began using its new extensible architecture to release free Web extensions, such as the Web Deployment Tool and Database Manager. Microsoft fully supports these extensions for the lifetime of the operating system and also has plans of localizing the extensions for international customers.
WebPI currently installs the latest IIS release (version 7.5, which shipped with Windows Server 2008 R2).
Also included in WebPI is IIS Express 7.5, the lightweight self-contained version optimized for developers.  IIS Express makes it easy to use the most current version of IIS to develop and test websites.  It has all the core capabilities of IIS 7.5 as well as additional features designed to ease website development including:
  • It doesn't run as a service or require administrator user rights to perform most tasks
  • IIS Express works well with ASP.NET and PHP applications
  • Multiple users of IIS Express can work independently on the same computer
Web PI simplifies the discovery and installation of Web server components by:
  • Automatically configuring the IIS Web server components that ship in Windows.On Windows 7 and Windows Vista, the Web server components are “Optional Windows Components.” Optional Windows components are part of the Windows installation but are not activated until the user explicitly goes through the process of activating the IIS Windows feature. Likewise, with Windows Server® 2003 and Windows Server 2008, a systems administrator uses Server Manager to install the Web Server role (which installs IIS). With Web PI, setting up the Windows components involves selecting a single product entry 
  • Automatically “discovering” IIS Extensions that ship on the Web.
    The IIS team ships extensions that expand the management and runtime capabilities of the IIS 7 Web server and applications hosted on IIS. Users can select from the IIS Web extensions that appear alongside the IIS components that ship in Windows. This integration makes it easy to find and install the Web extensions that the IIS product team delivers on a quarterly basis.
To see all the IIS components available for installation, just search for IIS or to install the recommended set, search for and install the IIS 7 Recommended Configuration
Figure 3: Searching for IIS components in WebPI
You can learn more about the IIS extension by double-clicking the extension name. For example, on the details page for an IIS component, you can learn more about what the extension does before installing it, and there are links to even more detailed descriptions.



Figure 4: More information on the IIS:  FTP Publishing Service 7.5  

Frameworks

The Frameworks section provides developers with programming frameworks for application development.
Figure 5: Frameworks
Web Pl 3.0 currently installs the latest community PHP 5.2.and 5.3 from the community PHP download page. Web PI installs PHP along with the following optional PHP components:
Web PI also installs ASP.NET MVC 3.0. ASP.NET is a powerful framework for building dynamic Web applications. As a programming framework, 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. The Model View Controller (MVC) extension enables users to build MVC applications by using the ASP.NET framework.

  

Database

The Database section includes the SQL Server tools for application development and management.
SQL Server 2008 R2 is a complete database engine providing ease of use and manageability for running high-performance Web applications. You can select SQL Server 2008 Express SP1 for a flexible runtime environment for database programming.
SQL Server 2008 R2 Management Studio Express gives developers tools to more easily manage databases in development, staging, or production environments—you can use this option if the SQL Server Express runtime itself is already installed to simplify the management of databases.
Figure 6: Database
The SQL Server 2008 R2 Management Objects gets pulled in as a dependency for some extensions and/or applications. (Typically, a user will not install this option.)
Web PI includes the Microsoft® SQL Server® 2008 Driver v 2.0 for PHP, which enables reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. The extension allows the reading and writing of data from within PHP scripts and provides a procedural interface for accessing data in all editions of SQL Server 2008 (including Express). The extension also supports the use of PHP streams to read and write large objects. Information, including the source code, is available on CodePlex.  

Tools

The Tools section provides developer tools to build Web applications for the Microsoft Web Platform.
Visual Web Developer Express is a free Microsoft® Visual Studio® Web development environment for building and testing next-generation, standards-based Web applications and services. With full support for Web standards, JavaScript, and ASP.NET, Visual Web Developer Express enables developers to quickly build out new applications.
The Microsoft® Silverlight™ 4 Tools for Visual Studio provide a development environment for Microsoft® Silverlight™ programmers. The Silverlight Tools are free add-ons to the free download version of Visual Web Developer Express or the full version of Microsoft® Visual Studio® 2010 SP1.
Figure 7: Tools

Install Applications from the Microsoft Web Application Gallery

The Web Platform Installer 3.0 simplifies discovery and deployment of ASP.NET and PHP applications in the Windows Web App Gallery.
When an application is added to the Windows Web Application Gallery, the application integrates into an Atom feed which Web PI consumes; every time a user opens the Web Applications tab, the user sees the latest applications in the Web Application Gallery.
Figure 8: Web Applications
By default, you see the full list of applications in the Windows Web Application Gallery. You can also browse by category to discover applications. These applications are free of charge (although the application provider can offer premium paid support) and follow the Windows Web Application Gallery Principlesfor running well on Windows.
When you select an application, Web PI automatically installs the prerequisite Windows components and other components (such as PHP) to run the application.  The list of required Web Platform dependencies for WordPress is displayed for you before installation.  In this example, Wordpress is being installed on a Windows 7 machine.  By default, WebPI will bring along Microsoft WebMatrix, a free, solid and reliable platform for customizing popular web applications.
The prerequisite information comes from the application developer. As part of the application submission process, the application provider gives Microsoft information such as a prerequisite environment and a URL to the Microsoft Web Deployment–enabled package. Web PI uses that information to make sure that the environment is set up properly to run the application on Windows, using the application package that is publicly available for download on the application community site.
For more developer information on Web Application Gallery, see the Windows Web App Gallery Developer site.

Best Practices for Using Web PI

Follow these best practices to prevent errors or installation issues when using the Web PI.
Close all programs and restart your computer.
The Web PI functions by running the setup for the selected applications one after the other, as in a chain. These setup programs are run “silently,” meaning they run without displaying a user interface. In some cases, setup programs will block an installation if certain applications are running. For this reason, all applications should be closed or stopped. A simple way to do this is to restart your computer. If an application is configured to start when Windows starts, you will need to close it manually.
Sometimes the Web PI encounters a problem due to a pending restart. Certain operations require a restart (for example, if system dynamic-link libraries (DLLs) are replaced by a system update or hotfix installation). Setup programs can, and do, block the installation when a restart is pending.
Keep Windows up to date.
Make sure your operating system and the any applications or components that are already installed have been updated. Software that is out of date may cause issues for which the Web PI has not been tested.
Uninstall pre-release applications and components.
Beta versions can create difficulty for installers because they use many of the same resources as the released version. For this reason, many setup programs block the installation of an application if a pre-released version is detected on the computer.
Avoid using the computer when installing Web PI.
Modifying the state of the machine while an installation is in progress can cause the installation to fail. For example, when a setup program starts it determines whether there is enough hard disk space available to install the application. Running applications or performing other tasks during the installation may cause the hard disk to have less space available and cause the installation to fail.

Troubleshooting and Finding Help

If you have an issue using the Web Platform Installer, visit the Web Platform Installer forum for free, best-effort support by the product team, or reviewTroubleshoot Microsoft Web Platform Installer Issues.
Note that because Web PI brings together community applications, Microsoft Web Platform components, and PHP, issues may occur at:
  • Web PI level—usually based on proxies, since Web PI depends on accessing public URLs.
  • Application package level—usually based on Web Deployment integration for application packaging.
  • Application functionality—questions about how applications work are redirected by Microsoft to the community forums for that application.