Export (0) Print
Expand All
3 out of 11 rated this helpful - Rate this topic

Running Web Applications on Windows Vista with IIS 7.0 and Visual Studio

You can use Visual Studio to create and work with ASP.NET Web sites (which are also known as Web applications) in a variety of configurations. This includes Internet Information Services (IIS) sites, file-system sites, File Transfer Protocol (FTP)–deployed sites, and remote sites.

IIS 7.0 is included with Windows Vista. However, when you first install Windows Vista, by default IIS 7.0 is not enabled. This topic describes how to enable IIS and configure it so that in Visual Studio you can create local IIS ASP.NET Web sites. This enables you to use a local copy of IIS to run and debug the Web site instead of using the ASP.NET Development Server.

When you create a local IIS Web site, the pages and folders for the site are stored in a folder under the default IIS folder for Web sites. This is located in the following folder:

%SystemDrive%\Inetpub\wwwroot

Visual Studio creates the appropriate IIS configuration so that the Web site is recognized by IIS as an application.

You can also create a virtual directory. In that case, the files for the Web site can be in any folder on the Web server computer.

IIS 7 provides a configuration section that enables machine administrators to specify a custom native assembly that implements CLR initialization and startup by configuring the managedRuntimeLoader attribute in the Application Pools applicatiionPools section of the Web.config file. For more information about the application , see Application Pools <applicationPools>.

NoteNote

The CLR integration point for ASP.NET applications is intended for use by the .NET Framework.

Installing the ASP.NET component of IIS 7.0 in Windows Vista enables ASP.NET Web applications to run as local IIS Web sites. To enable Visual Studio to create and use local IIS Web sites, you must enable metabase compatibility. This lets Visual Studio interact with the IIS metabase and with the IIS 7.0 configuration store.

If IIS is enabled on your computer before you install the .NET Framework version 4, ASP.NET 4 is automatically registered with IIS. However, if IIS is not enabled on the computer when you install the .NET Framework, you must manually register ASP.NET with the appropriate version of IIS by running the ASP.NET IIS Registration tool. For more information, see ASP.NET IIS Registration Tool (Aspnet_regiis.exe).

NoteNote

You must have administrative permissions to install IIS 7.0.

To enable ASP.NET on Windows Vista for debugging

  1. In , open Control Panel and then click Programs.

  2. Under Programs and Features, click Turn Windows features on or off.

    NoteNote

    If Control Panel is set to display in Classic view, click Programs and Features, and in then in the left pane, click Turn Windows features on or off.

    The Windows Features dialog box is displayed.

    NoteNote

    If User Account Control (UAC) is enabled, it might display a message when you try to access the Windows Features dialog box. Click Continue to access the dialog box. For more information, see User Account Control.

  3. Expand Internet Information Services.

  4. Expand Web Management Tools, expand IIS 6 Management Compatibility, and then select the IIS 6 Metabase and IIS 6 configuration compatibility check box.

  5. Expand World Wide Web Services, expand Application Development Features, and then select the ASP.NET check box.

    NoteNote

    The options that are required for Web application development will automatically be selected.

  6. Expand World Wide Web Services, expand Security, and then select the Windows Authentication check box.

    To enable Visual Studio to debug applications, you must configure IIS 7.0 with the Windows Authentication module. By default, the module is not configured as part of IIS.

  7. Click OK to start the IIS and ASP.NET installation process.

  8. When the configuration process finishes, close Control Panel.

After you install IIS 7.0 as described in previous procedure, users can connect to Web sites hosted by IIS by using the HTTP or HTTPS protocols.

Important noteImportant

You should limit access to the Web site application to only the intended users. To do this, specify authentication, which is how an application identifies who a user is, and authorization, which is how an application identifies what users have permission to do. For more information, see Limiting Access to ASP.NET Web Sites.

You can also develop and modify IIS 7.0 Web sites and applications in Visual Studio.

To start the IIS 7.0 Web server in Windows Vista

  1. In Windows Vista, click Start, right-click Computer, and then click Manage.

    The Computer Management dialog box is displayed.

    NoteNote

    If User Account Control (UAC) is enabled, it might display a message when you try to access the Windows Features dialog box. Click Continue to access the dialog box. For more information, see User Account Control.

  2. Expand Services and Applications, and then select Internet Information Services (IIS) Manager.

  3. In the right pane, under Connections, expand the name of the Web server and then expand Web Sites.

  4. Right-click Default Web Site, and then click Start.

  5. If you need a secure Internet connection, set up Secure Sockets Layer (SSL). For more information, see How to: Set Up Secure Sockets Layer (SSL).

To access local IIS Web sites, you must run Visual Studio in the context of an administrator account. By default, Windows runs applications in a limited-rights user account even when you are logged on to the computer as an administrator.

To run Visual Studio with administrative permissions in Windows Vista

  1. In Windows Vista, click Start, click All Programs, and then locate Visual Studio.

  2. Right-click Microsoft Visual Studio, and then click Run as administrator.

    NoteNote

    If User Account Control (UAC) is enabled, it might display a message when you try to access the Windows Features dialog box. Click Continue to access the dialog box. For more information, see User Account Control.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.