View Table: My Document

Title
Deploying an ASP.NET Server (IIS 7)
Doc

Deploying an ASP.NET Server (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista 

An ASP.NET Web server is an extended IIS server that has the ASP.NET runtime extensibility model integrated into the core server. The ASP.NET server configuration uses IIS modules for ASP.NET, .NET Extensibility, Request Filtering, ISAPI Filters, and ISAPI Extensions to the default IIS 7 Web server installation. This topic describes how to install the IIS modules that are required to deploy an ASP.NET Web server.

 

The following table describes the IIS modules that are added to the default installation for an ASP.NET Web server.

 

IIS module name Description

ASP.NET

Enables your Web server to host ASP.NET applications.

.NET Extensibility

Allows changes, additions, and extensions of Web server functionality in the request pipeline, the configuration, and the user interface.

Request Filtering

Performs UrlScan tasks such as configuring allowed verbs and file name extensions, setting limits, and scanning for bad character sequences.

ISAPI

Hosts ISAPI extension DLLs.

ISAPI Extensions

Supports dynamic Web content development using ISAPI extensions.

noteNote
In order to run ASP.NET 1.1 on Windows Server® 2008, you must also include the Metabase Compatibility module.

 

 

If you want your ASP.NET 1.1 applications to run in Integrated mode, you must upgrade them to ASP.NET 2.0. If you do not upgrade to ASP.NET 2.0, your ASP.NET 1.1 applications will run in Classic mode. For information about Integrated and Classic modes, see click="javascript:Track('ctl00_MTCS_main_ctl00|ctl00_MTCS_main_ctl03',this);" target="blank">Upgrading ASP.NET 1.1 to IIS 7 on Windows Vista & Windows Server 2008.

To deploy an ASP.NET server

You can use the Web Platform Installer (Web PI) to easily install IIS, and applications that run on IIS. Because the Web PI installs the latest versions of available Web Platform offerings, with just a few simple clicks you can download and install any new tools or updates. To learn more about the Web PI, see click="javascript:Track('ctl00_MTCS_main_ctl00|ctl00_MTCS_main_ctl04',this);" target="blank">Learn more and install the Web PI.

You can also perform this procedure by using the Windows user interface (UI) or from a command line.

To use the UI on Windows Server 2008 or Server 2008 R2
  1. Click Start, point to Administrative Tools, and then click Server Manager.

  2. In Roles Summary, click Add Roles.

  3. Use the Add Roles Wizard to add the Web server role.

    For detailed instructions about how to install a default IIS 7 Web server, see click="javascript:Track('ctl00_MTCS_main_ctl00|ctl00_MTCS_main_ctl05',this);">Deploying a Static Content Server (IIS 7).

  4. On the Select Role Services page, note the preselected role services that are installed by default, and then select the following additional role services:

    • ASP.NET

       
    • .NET Extensibility

       
    • Request Filtering

       
    • ISAPI

       
    • ISAPI Extensions

       
  5. On the Summary of Features to Install page, confirm your selections, and then click Install.

  6. On the Installation Results page, confirm that your installation of the Web Server (IIS) role and required role services completed successfully, and then click Close.

  7. To verify that IIS installed successfully, type the following into a Web browser:

    http://localhost

    You should see the default IIS Welcome page.

To use the UI on Windows Vista or Windows 7
  1. Click Start, and then click Control Panel.

  2. In Control Panel, click Programs, and then click Turn Windows features on or off.

  3. In the Windows Features dialog box, click Internet Information Services to install the default features, and then select the following additional features:

    • ASP.NET

       
    • .NET Extensibility

       
    • Request Filtering

       
    • ISAPI

       
    • ISAPI Extensions

       
  4. Click OK to close the Windows Features dialog box.

  5. To verify that IIS installed successfully, type the following into a Web browser:

    http://localhost

    You should see the default IIS Welcome page.

To use the command line
  • Type the following command at a Command Prompt or into a script:
    Start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-Security;IIS-RequestFiltering;IIS-HttpCompressionStatic;IIS-WebServerManagementTools;IIS-ManagementConsole; WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

 

********************************************************************

Deploying

 

********************************************************

 

Verifying the Developer Experience – ASP.NET

 
  • Published on January 18, 2009 by walterov
  • Updated on March 14, 2009 by walterov
 

Introduction

This walkthrough is intended to help hosters verify that their customers can use the Windows Web Platform tools and services to download, customize, publish, and manage their applications in a Hosted Environment.

In this case we’ll play the role of the developer and use the Microsoft Web Patform Installer to deploy a popular CMS ASP.NET application called “Graffiti CMS” in the local developer machine. Once we verify that works we’ll proceed to deploy it in the hosted server.

In summary this walkthrough covers:

  1. Using Web Platform Installer to install Graffiti CMS in a developer machine
  2. Configuring the application to use SQL Server and test it locally
  3. Using Visual Web Developer to modify and publish the application to the remote server.
  4. Using IIS Manager Remote Administration feature to change the application Connection String to point to the new SQL Server.

Prerequisites

  1. The hoster must have provided the developer with credentials that have access to an FTP site that shared its content with the corresponding Web Site. See FTP and VWD articles <link: http://learn.iis.net/page.aspx/537/guide-to-deploy-ftp-and-publish-with-vwd/> for details on how to setup this configuration so that users are isolated from each other.
  2. The hoster must have provided the developer with a SQL Server database.
  3. The developer must have installed Visual Web Developer (VWD) and SQL Server.
  4. The developer must have installed the Web Platform Installer (WPI). Follow the instructions at <link: http://go.microsoft.com/fwlink/?LinkId=145510>

Step 1: Using WPI, install the Graffiti CMS application on your development machine

As of the writing of this article a new version of Web Platform Installer is being released to the Web. Please visit http://go.microsoft.com/fwlink/?LinkId=145510 for more information. The set of applications include Graffiti CMS.

Step 2: Verify the existence of the Graffiti CMS Site and corresponding Database:

  1. Run IISMgr and view the Sites folder in the left-hand panel.


     
  2. Run SQL Management Studio and view the Graffiti DB in the database tables:


     
  3. Use IE to browse to the site:


     

Step 3: Configure Graffiti to use the SQL Server Database already created.

At this point you have the Graffiti application running and a SQL db created for it. However, the SQL database is not the one used by the application by default. Out-of-the box it uses its own db system (VistaDB),  see connection string dialog below for the site:

The steps to setting up SQL Server are very simple:
 

  1. Using the Graffiti database:
    • Execute the Graffiti_SQL_Schema.sql file found in the Data folder.
    • Execute the Graffiti_SQL_Data.sql file found in the Data folder.
  2. Add the connection string of your database to the web.config file. It should have the name "Graffiti":

    <add name="Graffiti" connectionString="server=SERVERNAME; database=Graffiti; User ID=graffiti; Password=********” />

    You can accomplish it through the Connection Strings Module in IIS Manager:




     
  3. Change the AppSetting key DataBuddy::Provider value to DataBuddy.SQLDataProvider, DataBuddy in the web.config file.


     
  4. With Internet Explorer browse to the Graffiti site. Notice that since the SQL db does not render the same data that comes in the default database:


     
  5. Verify that the Application Admin credentials work the temporary password for the admin user can be found in the web.confg file:


     
  6. Enter the credentials and press Login:


     
  7. The Admin Control Panel page is display:


     

Now you are ready to publish the application.


Step 4: Use Visual Web Developer (VWD) to Modify and Publish Your Application

  1. Open your Graffiti Site with VWD. The following dialog will display, press Yes to upgrade the site to .NET Framework version 3.5.




     
  2. Open the menu Website and select “Copy Web Site”:


     
  3. Select FTP Site and enter the Server name, Port and user account credentials. Ensure that “Passive Mode” is checked and press Open:


     
  4. Publish the entire content to the target server.


     

Step 5: Use IIS Manager Remote Administration to change the Graffiti Site Connection String to point to the new SQL server.

  1. Start IISMgr, if you are running Vista ensure that you are running the remote version of IISMgr:


     
  2. Connect to the Remote Site:


     
  3. Enter the Hoster provided user credentials:


     
  4. Assign a name to the new connection:


     
  5. Install any IIS Manager extension modules that are offered in the following dialog:


     
  6. Select your new Graffiti site, find the Connection String icon and double click on it:


     
  7. Change the Server Name to the new target SQL Server


     
  8. To upload the database you can use the facilities provided by the hoster. Either through database backup and restore process through FTPor any other control panel facility that would let you run the Graffiti_SQL_Schema.sql and Graffiti_SQL_Data.sql files.
  9. Test that the application works in the new hosting environment. Here is a screen shot after creating a post as the Admin user:


     

Conclusion

This walkthrough covered:

  1. Using Web Application Installer to install Graffiti CMS in a developer machine
  2. Configuring the application to use SQL Server and test it locally
  3. Using Visual Web Developer to modify and publish the application to the remote server.
  4. Using IIS Manager Remote Administration feature to change the application Connection String to point to the new SQL Server.

 

 

Revised
4/5/2010
Key Words
web
Owner
Webmaster
upload
user ID
5