Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Create Local IIS Web Sites 

Visual Studio 2005

A local Internet Information Services (IIS) Web site is an IIS Web application on your computer. Visual Web Developer communicates with local Web sites by using the HTTP protocol. You can create a new local IIS Web site that uses files in the following ways:

  • You can create a new IIS application, which creates a new folder and files under the IIS root.

  • You can create a Web site that points to an existing IIS application, and then edit the files in that application.

  • You can create a new virtual directory, which creates a new IIS application that points to files that are in a folder other than the IIS root. You can either create a new folder or point to a folder that already contains files.

To create a local IIS Web site requires the following:

  • IIS version 5.0 or later must be installed on your computer and must be running.

  • You must be logged in as a user with administrative privileges. This is required because working with the IIS metabase (where information about IIS applications is stored) requires administrative privileges.

  • ASP.NET 2.0 must be enabled on IIS. For details, see the topic Enabling ASP.NET in the IIS documentation at IIS 6.0 Product Documentation.

To open an existing local IIS Web site, the preceding must be true, and in addition:

NoteNote

Static files, such as images and style sheets, are not subject to ASP.NET authorization when they are served through IIS. Use IIS security features to restrict access to static files if they are not meant for all users. If you use the ASP.NET Development Server to test your ASP.NET application, the application will behave differently. This is because static files are subject to ASP.NET authorization and will not be served to an anonymous user when anonymous access to those files is disabled.

To create a local IIS Web site

  1. In Visual Web Developer, on the File menu click New Web Site.

  2. Under Visual Studio Installed Templates, select the template for the type of Web site that you want to create.

  3. To create a Web site directly, do the following:

    1. In the Location list, click HTTP.

    2. In the location box, type the URL of the site to create in the following format: http://localhost/SiteName.

    3. Click OK.

    Alternatively, follow the remaining steps in this procedure to create a Web site based on an existing IIS application or to create a site that uses a virtual directory.

  4. Click Browse.

  5. In the Choose Location dialog box, click the Local IIS tab.

  6. In the tree, open the node for the IIS Web site where you want to create your new Web site. (Typically, this is Default Web Site.)

  7. To create a new IIS application:

    1. Select the node that you want as parent of the IIS application.

    2. Click the Create New Web Application button. Visual Web Developer creates a new folder.

    3. Type a name for the folder.

  8. To create a local IIS Web site that uses files from an existing IIS application:

    1. In the tree, select the node that represents the IIS application you want to work with.

  9. To create a new virtual directory:

    1. Click the Create New Virtual Directory button.

    2. In the New Virtual Directory dialog box, type the alias and then type or select the folder where the files will be located. If the folder does not exist, Visual Web Developer will prompt you to create it.

  10. Click Open to return to the New Web Site dialog box, and then click OK.

    NoteNote

    If the path you specified already contains files, Visual Web Developer prompts you to confirm that you want to open the files from that application.

    Visual Web Developer creates the Web site. If you are creating a new site, Visual Web Developer opens a default page in the page designer, and displays the folder in Solution Explorer.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft