This documentation is archived and is not being maintained.

Introduction to Web Projects

Visual Studio .NET 2003

There are many types of projects available in Visual Studio .NET, each designed for a specific purpose. Each project contains specific types of files, references, and default items. In Visual Basic and Visual C#, two of the major kinds of projects you can create are Web-based projects and local projects. Web projects are stored and managed on a Web server with the purpose of being exposed to a network, whereas local projects are stored locally and not optimized for network access.

Visual Basic and Visual C# include templates to help you create three types of Web-based projects:

For more information about Web projects, see Working with Web Projects. For more information about choosing between Web and local projects, see Windows Forms and Web Forms Recommendations and Local vs. Web Projects.

Web Project User Interface

When you create a Web application in Visual Basic and Visual C#, you create programmable Web pages that serve as the user interface for your Web application. A Web Forms page presents information to the user in any browser or client device and implements application logic using server-side code. Web Forms page output may contain almost any HTTP-capable language, including HTML, XML, WML, and ECMAScript (JScript, JavaScript). For more information, see Introduction to Web Forms Pages.

Access and Storage for Web Project Files

You can choose two ways for Visual Studio to manage the files in your ASP.NET Web application:

  • FrontPage Server Extensions access - All files are managed using the HTTP protocol.
  • File-share access - All files are managed using Windows-based file management commands. This option requires LAN access to the server, but it can be slightly faster because there is less management overhead. In addition, file-share access provides superior support for source-code control.

For more information on access methods and choosing the correct method, see Web Access Methods.

In addition, Visual Studio keeps files in a cache on the local computer. The local directory is created and used for two reasons:

  • Certain designers require file-level write access to some of your project files. If you are using FrontPage Server Extensions, you access the server using HTTP, which would preclude these designers from accessing the files they need.
  • Keeping files in the cache allows you to work on your Web Forms pages in Offline mode. For more information, see Taking Web Projects Offline.

The cache is always kept in sync with the actual project files on the server. (If you are in Offline mode, the files are synchronized when you reconnect to the server project.) When you change a file in your project, the update is written to both the server and the cache. In a few instances, files are kept in the cache but not written to the server, as with intermediate files created during a build process.

Essentially, the cache is a temporary directory used by Visual Studio. You will see references to the cache when you are creating a deployment project. However, you should not otherwise have any cause to see or work with the cache.

Web Project Security

On the file level, you can use the Web permissions feature of Visual Studio to control who can gain access to your Web project files and what level of access individuals have to the application. The permissions you set in Visual Studio are applied to Windows entities (folders, users, groups, and so on.) They are similar to equivalent permissions you can set in Internet Information Services (IIS). You can choose to set individual rights or simply inherit the rights of the Web folder that the application is stored in. For more information, see Setting Web Permissions.

On an application level, security concerns are a critical part of the decisions you must make in designing and creating your Web application. Web applications by definition allow users access to a central resource — the Web server — and through it, to others such as database servers. By understanding and implementing proper security measures, you guard your own resources as well as provide a secure environment in which your users are comfortable working with your application. For more information on the security considerations you must face when creating your application, see Introduction to Web Application Security.

Debugging and Deploying Web Projects

When you build a Web project, the application files are remotely compiled on the Web server. Information is sent to the Web application, processed, and the results are then returned to the client computer and viewed as a Web Form or an update of information on a Web Form. For more information, see Debugging Preparation: ASP.NET Web Applications.

You can use deployment projects to quickly and easily deploy your Web applications to the appropriate servers. For more information, see Walkthrough: Deploying a Web Solution.

See Also

Creating Web Projects | Working with Web Projects | Web Forms Pages | ASP.NET Applications | Creating Web Applications and Services | Introduction to ASP.NET Web Applications in Visual Studio | Visual Basic and Visual C# Projects | Debugging Preparation: ASP.NET Web Applications | Walkthrough: Deploying a Web Solution | Introduction to Web Application Security | Setting Web Permissions

Show: