Web Site or Web Application in ASP.NET

2019-01-19 07:57发布

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

7条回答
闹够了就滚
2楼-- · 2019-01-19 08:59

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.
查看更多
登录 后发表回答