Export (0) Print
Expand All
14 out of 17 rated this helpful - Rate this topic

Types of Web Site Projects in Visual Studio

Describes different methods Visual Studio can use to access files for Web site projects.

Visual Studio can access the files of a Web site project directly in a computer's file system, through IIS on the local computer or a remote computer, or through FTP on a remote computer. The names of Web site project types identify the method used: file-system sites, local or remote IIS sites, and File Transfer Protocol (FTP)–deployed sites.

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

You can create a file-system Web site project 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 Studio.

You test local IIS Web site projects using a copy of IIS that is installed on your computer. When you create a local IIS Web site project, 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.

NoteNote

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

Alternatively, you can create an IIS virtual directory in Visual Studio. In that 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).

A remote Web site project uses IIS that 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 Server Extensions from Microsoft. When you create a remote Web site project, the pages and folders for your site are stored under the default IIS folder on the remote computer. By default, this folder is located at [drive]:\Inetpub\wwwroot. When you test pages in the project, they are served using IIS on the remote computer.

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 Studio.

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

Web site project type

Summary

File-system Web site project

Use a file-system Web site project when you want to create Web pages on your local computer or on a shared drive and you do not have IIS installed. 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, which reduces 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. There are also some differences between the way the Visual Studio Development Server works and the way IIS works. Therefore, you should test your project by running it with IIS before deploying it to production.

Local IIS Web site project

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

Advantages

  • The site can be accessed from other computers if IIS is configured to make it available to them.

  • You can test with IIS features, such as HTTP-based authentication, application pooling, and ISAPI filters. You should test with IIS before you deploy to production anyway due to differences between the Visual Web Development Server and IIS. Therefore, testing in Visual Studio more accurately represents how the site will behave in production (except that security is likely to be different in test and production.)

Disadvantages

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

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

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

Remote IIS Web site project

Use 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 project on the server where it will be deployed.

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

Disadvantages

  • Configuration for debugging a remote Web site project is complex.

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

FTP Web site project

Use an FTP Web site project 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 Web site project on the server where it will be deployed.

Disadvantages

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

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

  • Typical file editing operations, such as opening and saving files, might be slow.

  • Because you are editing a live site, it is easier than with other Web project types to introduce an error that users can see.

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.