ASP.NET Web站点或Web项目 [英] ASP.NET Web Site or Web Project

查看:115
本文介绍了ASP.NET Web站点或Web项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
   ASP.NET:Web站点或Web应用程序

在创建在Visual Studio中新的ASP.NET项目,我应该选择创建:网站或项目?

When creating a new ASP.NET project in Visual Studio should I chose create: website or project?

据我所知,Web应用程序项目是做回用VS 2003天的方式,但今天它仍然适用?什么是一些使用了另一种告诫的?

I understand that web application project was the way to do it back in the day with VS 2003 but is it still applicable today? What are some of the caveats using one over the other?

推荐答案

有一个的在MSDN上 pretty良好的比较图。

There's a pretty good comparison chart on MSDN.

网站项目很简单,因为所有添加到项目文件夹中的文件会被自动编译和收录,这是假想加入使其更加可口传统的ASP和PHP开发人员。一旦好处是,它包括建立供应商,它允许对与文件类型关联的某些操作 - 这是如何亚音速的第一个版本将重建数据访问层,当你添加一个文件.abp到网站

Website projects are simple, in that all files added to the project folders are automatically compiled and included, which was supposedly added to make it more palatable to classic ASP and PHP developers. Once benefit is that it includes build providers, which allow for certain actions to be associated with a filetype - that's how the first release of SubSonic would rebuild the data access layer when you added a .abp file to the site.

Web应用程序项目很多更加灵活,虽然。例如,在一个网站项目的所有类库必须在APP_ code文件夹,这是一个复杂的应用令人沮丧。有很多刚刚没有为网站项目的工作方案。

Web Application Projects are a lot more flexible, though. For instance, all class libraries in a Website Project need to be in the App_Code folder, which is frustrating in a complex application. There are a lot of scenarios which just don't work for a Website Project.

您可以从一个到另一个转换,但如果你不确定我建议刚开始使用Web应用程序。

You can convert from one to another, although if you're unsure I'd recommend just starting with a Web Application.

这篇关于ASP.NET Web站点或Web项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆