Creating Web Projects
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Creating Web Projects

Visual Studio .NET 2003

A Web project can be either a standard ASP.NET Web application or an XML Web service that is designed to be consumed by other applications. For more information, see Creating Web Applications and Services.

The Web server on which your project exists can be on either a local or remote computer. When you create a new Web project, you must specify the type of file access to use; Visual Studio .NET uses file-share Web access as the default for all your Web projects, unless you change the default setting in the Options dialog box. To determine which Web access method to use, see "Choosing the Best Access Method" in Web Access Methods. If you want to change the Web access method, see Changing Web Project Access Methods.

Note   Changing the default Web access method in the Options dialog box does not affect a project you have open; the setting affects only future Web projects. Therefore, you should usually specify a Web access method before you create a new Web project.

To specify the default Web access method

  1. On the Tools menu, choose Options.
  2. Expand the Projects node in the left pane, and then select Web Settings.
  3. In the Preferred Access Method section, choose either the File share or FrontPage access method.

    All new Web projects you create will use that Web access method as the default. If you want to change the Web access method for an existing Web project, see Changing Web Project Access Methods.

To create a new Web project

  1. On the File menu, point to New and then click Project to display the New Project dialog box.
  2. In the Project Types pane, select either Visual Basic or Visual C#.
  3. In the Templates pane, select the type of Web project you want to create. For an overview of Web project types, see Visual Basic and Visual C# Projects.
  4. In the Location text box, specify the URL where you want to place the Web project, including the name you want to give it.

    For example, to create a project titled myWebApp at the default localhost location, the URL string placed in the Location text box will look like this:


    This allows for exact placement of your project files in a specific directory on a Web server.

    Note   If the local computer you are working on is also a Web server, you can create your Web project on that computer. The first time you start Visual Studio, the default location of a Web project is your local computer. In subsequent Visual Studio sessions, you can select the location of a previously used Web server from a drop-down list. If you want to choose a different server, you can click the Browse button to find other servers on your network, or you can type in the URL to a server (for example, and press ENTER.
  5. Click OK to create the Web project.

    Visual Studio connects to the server and adds the appropriate project items to Solution Explorer in the project node.

See Also

Web Access Methods | Opening Web Projects | Working with Web Projects | Changing Web Project Access Methods | Visual Basic and Visual C# Projects

© 2016 Microsoft