Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this
0 of .
Results for:
No results containing your search query
P. 1
ASP.net4.0 and Visual Studio 2010 Web Development Beta 1 Overview

ASP.net4.0 and Visual Studio 2010 Web Development Beta 1 Overview

|Views: 1,403|Likes:
Published by samaymahajan

More info:

Categories:Types, Brochures
Published by: samaymahajan on Jun 22, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





ASP.NET 4.0 and Visual Studio 2010Web Development Beta 1 Overview
Many exciting changes for ASP.NET are coming in the .NET Framework version 4.0. This document gives an overview of many of the new features that are included inthe upcoming Beta 1 release of .NET 4.0 and in the Visual Studio 2010 release.
ASP.NET 4.0 and Visual Studio 2010 Web Development Overview1© 2009 Microsoft Corporation
Core Services
ASP.NET 4 introduces a number of features that improve core ASP.NET services suchas output caching and session-state storage.
Extensible Output Caching
Since ASP.NET 1.0 was released, output caching has enabled developers to store thegenerated output of pages, controls, and HTTP responses in memory. Onsubsequent Web requests, ASP.NET can serve content more quickly by retrieving thegenerated output from memory instead of regenerating the output from scratch.However, this approach has a limitation — generated content always has to bestored in memory, and on heavily trafficked servers, the memory consumed byoutput caching can compete with memory demands from other portions of a Webapplication.
ASP.NET 4.0 and Visual Studio 2010 Web Development Overview2© 2009 Microsoft Corporation
ASP.NET 4.0 adds an extensibility point to output caching that enables you toconfigure one or more custom output-cache providers. Output-cache providers canuse any storage mechanism to persist HTML content. This makes it possible tocreate custom output-cache providers for diverse persistence mechanisms, whichcan include local or remote disks, cloud storage, and distributed cache engines. You create a custom output-cache provider as a class that derives from the new
type. You can then configure theprovider in the
file by using the new
subsection of the
element, as shown in the following example:
<caching><outputCache defaultProvider="AspNetInternalProvider">
< providers<add  name="DiskCache" type="Test.OutputCacheEx.DiskOutputCacheProvider, DiskCacheProvider"/>  </ providers
By default in ASP.NET 4.0, all HTTP responses, rendered pages, and controls use thein-memory output cache, as shown in the previous example, where the
attribute is set to
. You can change the defaultoutput-cache provider used for a Web application by specifying a different providername for
.In addition, you can select different output-cache providers per control and perrequest. The easiest way to choose a different output-cache provider for differentWeb user controls is to do so declaratively by using the new
attributein a page or control directive, as shown in the following example:
<%@OutputCache Duration="60"VaryByParam="None"providerName="DiskCache" %>
Specifying a different output cache provider for an HTTP request requires a littlemore work. Instead of declaratively specifying the provider, you instead override thenew
method in the
file toprogrammatically specify which provider to use for a specific request. The followingexample shows how to do this.
public override stringGetOutputCacheProviderName(HttpContextcontext) { if(context.Request.Path.EndsWith("Advanced.aspx"))
ASP.NET 4.0 and Visual Studio 2010 Web Development Overview3© 2009 Microsoft Corporation

Activity (24)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
ALi liked this
redwh@le liked this
betaalus liked this
abhi_shrotriya liked this
ZdravkoSK liked this
Geno Stefanov liked this
nimesh patel liked this
Armaan Can't Change liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->