Export (0) Print
Expand All

Local IIS Web Site Projects

A local Internet Information Services (IIS) Web site project is an IIS Web application on your computer. Visual Studio communicates with the Web site project by using the HTTP protocol. Creating or opening a local IIS Web site project is useful in the following situations:

  • You want to test your Web site project using IIS in a way that closely emulates how the Web site will run on a production server. This can have advantages over working with file-system Web site projects that run using the Visual Studio Development Server, because paths are resolved as they will be on a production server.

  • You already have a set of Web site files in a folder and you want to test the Web site with IIS. In that case, you can create a virtual directory in your local version of IIS.

  • Your local computer is also your Web server.

To open an existing local IIS Web site project or create a new one requires the following:

  • Your computer must have at least IIS version 5.0 installed and running.

  • ASP.NET version 2.0 or later must be installed and enabled in IIS. For details, see ASP.NET IIS Registration Tool (Aspnet_regiis.exe).

  • The computer must be running the version of the .NET Framework that you are targeting, except that you can target 2.0 or 3.0 if you are running 3.5 or 4. For more information about targeting Web sites for specific versions of the .NET Framework, see .NET Framework Multi-Targeting for ASP.NET Web Projects.

  • You must be logged in as a user with administrative privileges.

To open an existing local IIS Web site also requires the following:

  • The site to be opened must be configured as an IIS application. For more information, see the topic "Creating Virtual Directories in IIS 6.0" in the Create a Virtual Directory (IIS 7).

  • The site must be configured to use ASP.NET version 2.0 or later. It is possible to have ASP.NET 2.0 or later installed on the computer but have the site to be opened still mapped to use an earlier version of ASP.NET.

When you create the Web site project, Visual Studio performs all of the tasks that are required in order to make the Web site project function as an IIS application. Visual Studio creates the folder or folders for your Web site project under the Web root for IIS (for example, under \inetpub\wwwroot). After creating folders, Visual Studio creates the files for the Web site project template that you selected.

NoteNote

You can create an IIS application as a subfolder of any existing IIS folder.

When you create or open a local IIS Web site project, Visual Studio creates a project file to manage the Web site files. The project file stores a small amount of information, such as your choices for how to run the application and what debuggers are available. Project information is stored on a per-user basis. For more information, see ASP.NET Web Projects.

By default, when you run a local IIS Web site project to test it, Visual Studio launches a browser and runs the Web site using the server name localhost. For example, if you have created the Web site ExampleSite, when you test it in Visual Studio, the browser will request the test page from this URL:

http://localhost/ExampleSite/page

IIS resolves the application name, whether it points to a folder that is under the IIS root or to another location, and serves pages from that folder.

For more information, see Testing Web Pages in Visual Web Developer.

Local IIS Web site projects are generally used only for development, so that individual developers can create and test ASP.NET Web pages on their own computers. In most cases, you must deploy the files to a production server that is running IIS. For information about how to deploy Web site projects, see ASP.NET Deployment Content Map.

Community Additions

ADD
Show:
© 2014 Microsoft