次の方法で共有


Types of Web Sites in Visual Web Developer

Describes how files are stored on your Web site, using either file-system based Web sites or those that require Internet Information Services (IIS).

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: local IIS sites, file-system sites, File Transfer Protocol (FTP)–deployed sites, and remote sites. For guidelines to help you decide when to use each type of Web site, see the table in Choosing a Web Site Type later in this topic.

Local IIS Web Sites

Local IIS Web sites run using a copy of IIS that is installed on your computer. When you create a local IIS Web site, the pages and folders for your site are stored in a folder under the default IIS folder for Web sites, which is located at [drive]:\Inetpub\wwwroot. Visual Studio also creates the appropriate IIS configuration so that the Web site is recognized by IIS as an application.

Note

To create a local IIS Web site, you need to have administrative privileges on the computer.

Alternatively, you can create an IIS virtual directory in Visual Studio. In this case, the pages and folders for your Web site can be in any folder to which users have access, and a virtual directory in your local copy of IIS must point to the file location. For more information, see ASP.NET Required Access Control Lists (ACLs).

Note

If you create a Web site whose name contains non-ANSI characters on IIS 5.1 or earlier, you will not be able to browse to the site because those versions of IIS do not resolve URLs that contain non-ANSI characters.

File-System Web Sites

In a file-system Web site, you can create and edit files in any folder you like, whether on your local computer or in a folder on another computer that you access via network share. You are not required to run IIS on your computer. Instead, you can test pages by using the ASP.NET Development Server. For details, see Web Servers in Visual Web Developer.

Note

The ASP.NET Development Server cannot serve pages to another computer. Therefore, it is suitable only for testing pages locally.

In a file-system Web site, static files, such as images and style sheets, are subject to ASP.NET authorization rules. For example, static files in a file-system Web site will not be served to an anonymous user when anonymous access to those files is disabled. However, when you create a Web site project in an HTTP location, IIS serves static files without using authorization rules.

You can create a file-system Web site and later create an IIS virtual directory that points to the folder containing your pages. For details, see How to: Create IIS Virtual Directories in Visual Web Developer.

FTP-Deployed Web Sites

Visual Studio allows you to open and edit Web sites that are available on an FTP server. This is a typical scenario if your Web site is located on a hosting site.

You can connect from within Visual Studio to any FTP server on which you have Read/Write permissions. You can then create and edit Web pages on that server. If the FTP server is configured with ASP.NET and an IIS virtual root that points to the FTP directory, you can also run your pages from the server to test them. For more information, see Walkthrough: Editing Web Sites with FTP in Visual Web Developer.

Remote Web Sites

A remote Web site is a site that uses IIS but is on another computer that you can access over a local area network. The remote computer must have IIS installed and be configured with FrontPage 2002 Server Extensions from Microsoft. When you create a remote Web site, the pages and folders for your site are stored under the default IIS folder on the remote computer, which is located at [drive]:\Inetpub\wwwroot. When you run the pages, they are served using IIS on the remote computer. This is the model used in Visual Studio .NET 2002 and Visual Studio .NET 2003.

Note

As of December 2010, Microsoft FrontPage Server Extensions (FPSE) 2002 is no longer available for Windows Vista and Windows Server 2008 RTM. If FPSE is already installed on the destination server, you can create and open remote Web site projects on that server. If the server does not already have FPSE installed, you must choose a different Web site project type. For information about project types that are available, see Types of Web Sites in Visual Web Developer. For information about FPSE support, see Supportability of Front Page Server Extensions 2002 running on Windows Vista and Windows Server 2008 on the Microsoft KnowledgeBase Web site.

Note

If you create a Web site whose name contains non-ANSI characters on IIS 5.1 or earlier, you will not be able to browse to the site because those versions of IIS do not resolve URLs that contain non-ANSI characters.

Choosing a Web Site Type

The following table summarizes the types of Web sites that you can create in Visual Studio, which you can use when deciding which type of Web site meets your needs.

Web site type

Summary

Local IIS Web site

Use a local IIS Web site when you want to create Web pages on your local computer and you have IIS installed.

Advantages:

  • The site is accessible from other computers.

  • You can test with IIS features, such as HTTP-based authentication, application pooling, and ISAPI filters.

Disadvantages:

  • You must have administrative rights to create or debug an IIS Web site.

  • Only one user on the computer can debug an IIS Web site at one time.

  • By default, remote access is enabled for a local IIS Web site.

File-system Web site

Use a file-system Web site when you want to create Web pages on your local computer or on a shared drive and you do not have IIS installed.

Note

You can create a file-system Web site and later create an IIS virtual directory that points to the folder containing your pages.

Advantages:

  • The site can be accessed only from the local computer, reducing security vulnerabilities.

  • You do not need to have IIS installed on your computer.

  • You do not need administrative rights to create or debug a local file-system Web site.

  • If the computer is configured to allow remote desktop connections, multiple users can create and debug local file-system Web sites at the same time.

Disadvantages:

  • You cannot test a file-system Web site with IIS features, such as HTTP-based authentication, application pooling, and ISAPI filters.

FTP-deployed Web site

Use an FTP-deployed Web site when your site already exists on a remote computer that has been configured as an FTP server. (For example, your Internet service provider (ISP) has provided space on a server.)

Advantages:

  • You can test the FTP-deployed Web site on the server where it will be deployed.

Disadvantages:

  • You do not have local copies of the FTP-deployed Web site files unless you copy them yourself.

  • You cannot create an FTP-deployed Web site — you can only open one.

Remote Web site

Use a remote Web site when you want to create a Web site by using IIS running on a remote computer. The remote computer must be configured with FrontPage Server Extensions.

Advantages:

  • You can test the Web site on the server where it will be deployed.

  • Multiple developers can work with the same remote Web site at the same time.

Disadvantages:

  • Configuration for debugging a remote Web site can be complex.

  • Only one developer can debug the remote Web site at one time. All other requests are suspended while the developer is stepping through code.

See Also

Tasks

How to: Create File System Web Sites

How to: Create IIS Virtual Directories in Visual Web Developer

Walkthrough: Creating a Basic Web Page in Visual Web Developer

Walkthrough: Creating a Local IIS Web Site in Visual Web Developer

Walkthrough: Editing Web Sites with FTP in Visual Web Developer

Concepts

File System Web Sites