Web Site or Web Application in ASP.NET

Which Visual Studio template should be used for a ASP.NET web site, the Web Site template or the Project | Web Application template?


你最好看看这个:http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx在我看来,这取决于你在开发什么


Both function and perform similarly, but still differ in following ways:

Web application:

  • We can't include C# and VB pages in single web application.
  • We can set up dependencies between multiple projects.
  • Can not edit individual files after deployment without recompiling.
  • Right choice for enterprise environments where multiple developers work unitedly for creating, testing and deployment.
  • Web site:

  • Can mix VB and C# page in single website.
  • Can not establish dependencies.
  • Edit individual files after deployment.
  • Right choice when one developer will responsible for creating and managing entire website.

  • Web application projects works more like a traditional VS project, which has a project file, is compiled in one step and so on.

    Web site projects works more like classic ASP or PHP-sites. There is no project file (references are stored in the solution file), and pages are recompiled dynamically on the server. The nice thing with web sites is that you can just ftp to the server and change a file in a text editor. You dont need VS. Some may hate that, though.

    It probably depends on your background. If you are used to ASP or PHP style development, web site projects will seem more natural to you. If you have a traditional application developer background, web application projects will seem more natural.

    链接地址: http://www.djcxy.com/p/95916.html

    上一篇: Visual Studio中“网站”和“项目”之间的区别

    下一篇: 网站或ASP.NET中的Web应用程序