ASP.NET Web Site or ASP.NET Web Application?

前端 未结 25 3014
自闭症患者
自闭症患者 2020-11-21 08:26

When I start a new ASP.NET project in Visual Studio, I can create an ASP.NET Web Application or I can create an ASP.NET Web Site.

What is the difference between ASP.

25条回答
  •  庸人自扰
    2020-11-21 08:52

    To summarize some of the answers above:

    Flexibility, can you can make live changes to a web page?

    Web Site: Possible. Pro: short term benefits. Con: long term risk of project chaos.

    Web App: Con: not possible. Edit a page, archive the changes to source control, then build and deploy the entire site. Pro: maintain a quality project.

    Development issues

    Web Site: Simple project structure without a .csproj file.Two .aspx pages may have the same class name without conflicts. Random project directory name leading to build errors like why .net framework conflicts with its own generated file and why .net framework conflicts with its own generated file. Pro: Simple (simplistic). Con: erratic.

    Web App: Project structure similar to WebForms project, with a .csproj file. Class names of asp pages must be unique. Pro: Simple (smart). Con: none, because a web app is still simple.

提交回复
热议问题