`

ASP.NET中WebApplication与WebSite的比较

    博客分类:
  • ASP
阅读更多
WebApplication编程模型的优点:
●网站编译速度快,使用了增量编译模式,仅仅只有文件被修改后,这部分才会被增量编译进去。
●生成的程序集
WebSite:生成随机的程序集名,需要通过插件WebDeployment才可以生成单一程序集
WebApplication:可以指定网站项目生成单一程序集,因为是独立的程序集,所以和其他项目一样可以指定应用程序集的名字、版本、输出位置等信息
●可以将网站拆分成多个项目以方便管理
●可以从项目中和源代码管理中排除一个文件
●支持VSTS的Team Build方便每日构建
●更强大的代码检查功能,并且检查策略受源代码控制
●可以对编译前后进行自己规定的处理
●对App_GlobalResources 的Resource强类支持
●直接升级使用VS2003构建的大型系统

WebSite编程模型的优点:
●动态编译该页面,马上可以看到效果,不用编译整个站点(主要优势)
●同上,可以使错误的部分和使用的部分不相干扰
●可以每个页面生成一个程序集
●可以把一个目录当做一个Web应用来处理,直接复制文件就可以发布,不需要项目文件
●可以把页面也编译到程序集中


两种编程模型的互相转换:

VS2005 SP1内置了转换程序,可以非常方便的从WebSite转换到WebApplication只需要复制文件,右键执行“转换为Web应用程序”即可。
总之,大网站比较适合用WebApplication项目,小网站比较适合用WebSite项目

分享到:
评论

相关推荐

    ASP.NET 3.5 Website Programming: Problem - Design - Solution

    ASP.NET 3.5 Website Programming: Problem - Design - Solution Chris Love ISBN: 978-0-470-18758-6 Paperback 648 pages October 2009 * Uses the popular Problem;Design;Solution format to help readers, ...

    ASP.NET.Web.API.and.Angular.2.17864

    Now, this front-end can change to a mobile app, a website, desktop app, but what you do at the back doesn't change and remains ASP.NET Web API. This book focuses on blending and connecting ASP.NET ...

    asp.net知识库

    在 ASP.NET 2.0 中创建 Web 应用程序主题 ASP.NET 2.0 中的数据访问 ASP.NET 2.0:弃用 DataGrid 吧,有新的网格控件了! 将 ASP.NET 2.0 应用程序服务配置为使用 SQL Server 2000 或 SQL Server 2005 ASP.NET 2.0 ...

    ASP.NET的网页代码模型及生命周期

    创建Application,首先需要新建项目用于开发Web Application,单击菜单栏上的【文件】按钮,在下拉菜单中选择【新建项目】选项,在弹出窗口中选择【ASP.NET应用程序】选项,如图4-5所示。 图4-5 创建ASP.NET应用...

    asp.net mvc4 教程

    The web application landscape is vast and varied....that uses the ASP.NET MVC Framework, but a stable and scalable web application that is easy to grow and maintain with your expanding needs.

    ASP.NET Web API and Angular 2(PACKT,2016)

    Now, this front-end can change to a mobile app, a website, desktop app, but what you do at the back doesn’t change and remains ASP.NET Web API. This book focuses on blending and connecting ASP.NET ...

    新浪编辑器(asp.net封装版)

    这是本人根据下载的新浪编辑器改编的,我发现下载的新浪编辑器用在asp.net的website版(webapplication版可以直接用网上下载的)时,传图片上去不能显示,所以本人将其修改好了,两种版本都封装好了!

    ASP.NET Core 1.1 For Beginners: How to Build a MVC Website

    ASP.NET Core 1.1 For Beginners: How to Build a MVC Website by Jonas Fagerberg English | 19 May 2017 | ASIN: B071VX7KN4 | 411 Pages | PDF | 6.66 MB Want to learn how to build ASP.NET Core 1.1 MVC Web ...

    ASP.NET MVC Framework Unleashed(Stephen Walther)

    In this book, world-renowned ASP.NET expert and member of the Microsoft ASP.NET team Stephen Walther shows experienced developers how to use Microsoft's new ASP.NET MVC Framework to build web ...

    零基础学ASP.NET 2.0电子书&源代码绝对完整版1

    WebSite文件夹 创建的ASP.NET 2.0 Web站点。 www文件夹 第一个用C#开发的Web应用程序。 bianyi.bat 编译网站的批处理文件。 form.html 表单范例。 css.html CSS范例。 第3章...

    ASP.NET 4 Social Networking

    The book assumes you have prior experience of developing web applications using ASP.NET 4.0, C# , SQL Server 2008, and Visual Studio .NET 2010. If you working with earlier versions of any of these, ...

    [SNS] ASP.NET 4 社交网站 开发教程 (英文版)

    The book assumes you have prior experience of developing web applications using ASP.NET 4.0, C# , SQL Server 2008, and Visual Studio .NET 2010. If you working with earlier versions of any of these, ...

    高清Building Web Applications with Visual Studio 2017及源码

    After building the data application layer using Entity Framework Core and a RESTful service using ASP.NET Core, you will then build the client side web application three ways: first, using ASP.NET ...

    Pro.HTML5.with.Visual.Studio.2015.1484211480

    Chapter 2: ASP.NET Web Forms Chapter 3: MVC Web Applications Chapter 4: Cascading Style Sheets Chapter 5: Scripting Enhancements Chapter 6: Mobile Web Applications Part III: Digging Deeper Chapter 7:...

    零基础学ASP.NET 2.0&源代码绝对完整版1

    WebSite文件夹 创建的ASP.NET 2.0 Web站点。 www文件夹 第一个用C#开发的Web应用程序。 bianyi.bat 编译网站的批处理文件。 form.html 表单范例。 css.html CSS范例。 第3章...

    校园新闻发布管理系统

    Abstract ASP.NET is Web application program developing platform of new generation, it is one that has already compiled , development environment based on .NET, it has offered and produced all ...

    解读ASP.NET 5 & MVC6系列教程(2):初识项目

    打开VS2015,创建Web项目,选择ASP.NET Web Application,在弹出的窗口里选择ASP.NET 5 Website模板创建项目,图示如下: 我们可以看到,此时Web Forms\MVC\Web API复选框都选择不了,原有是因为在ASP.NET 5中做了...

    Learning Angular for .NET Developers【含代码】

    You will then move on to building web services and full-stack web application using ASP.NET WebAPI. Finally, you will learn the development process focused on rapid delivery and testability for all ...

    CSharp 3.0 With the .NET Framework 3.5 Unleashed(english)

    28 Adding Interactivity to Your Web Apps with ASP.NET AJAX 648 What Is AJAX? 648 Setting Up an ASP.NET AJAX Site 649 The AJAX Page Life Cycle 650 Loading Custom Script Libraries 652 ASP.NET...

Global site tag (gtag.js) - Google Analytics