What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking...
-
Upload
sharyl-cole -
Category
Documents
-
view
212 -
download
0
Transcript of What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking...
![Page 1: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/1.jpg)
What’s new in ASP.NET 4.0 ?
![Page 2: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/2.jpg)
Agenda
• Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently redirecting a page
• Changes to Web forms Better control of the viewstate Setting MetaTags Chart conrol Routing Setting Client IDs
![Page 3: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/3.jpg)
• Web Config File Refractoring• Auto-Start Web Applications• Expanding the Range of Allowable URLs• Extensible Request Validation• Object Caching and Object Caching Extensibility• Extensible HTML, URL, and HTTP Header
Encoding• Dynamic Lookup• Covariance and Contravariance• Variance in C# 4.0
![Page 4: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/4.jpg)
Extensible Output Caching
• Possibility of creation of own storage:
o Memoryo Local or Remote Drive o Cloud Serviceso Distributed Cache Engines
![Page 5: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/5.jpg)
To configure the custom cache provider, specify the details in your application's Web.config file
<configuration> <system.web> <compilation debug="true" targetFramework="4.0"/> <caching> <outputCache defaultProvider=“AspNetInternalProvide"> <providers> <add name="CacheProviderName" type="CacheProviderCategory"/> </providers> </outputCache> </caching> </system.web></configuration>
![Page 6: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/6.jpg)
Possibility of creation of Cache Providers :<%@ OutputCache Duration="60" VaryByParam="None" providerName="CacheProviderName " %>
Usage of Different cache providers for different pages:
public override string GetOutputCacheProviderName(HttpContext context){ if (context.Request.Path.EndsWith(“example.aspx")) return " CacheProviderName "; else return base.GetOutputCacheProviderName(context);}
![Page 7: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/7.jpg)
Shrinking Session State
In ASP.NET we can compress session state data for both Session-state server and Microsoft SQL server.<sessionState mode="SQLServer" sqlConnectionString="data source=local Initial Catalog=TestDB“ allowCustomSqlDatabase="true" compressionEnabled="true"/>
![Page 8: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/8.jpg)
Performance Monitoring
If multiple applications use a single shared worker process , it is difficult for server administrators to identify an individual application performance.
In IIS hosted ASP.NET 4.0 application we can gather performance data for an individual ASP.NET Application.
![Page 9: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/9.jpg)
Settings in the Aspnet.config file
<configuration> <runtime>
<appDomainResourceMonitoring enabled="true"/>
</runtime> </configuration>
![Page 10: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/10.jpg)
Permanently Redirecting
New RedirectPermanent method that makes it easy to issue HTTP 301 Moved Permanently responses.
Example:Response.RedirectPermanent("newlocation/page.aspx");
![Page 11: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/11.jpg)
Routing
Routing Mechanism.
![Page 12: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/12.jpg)
Essential Points for a URL
• A domain name that is easy to remember and easy to spell
• Short URLs• Easy to type URLs• URLs that visualize site structure• Persistent URLs that don't change
![Page 13: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/13.jpg)
URL Routing in .NET 4.0
![Page 14: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/14.jpg)
Namespace: System.Web.Routingpublic Route MapPageRoute( string routeName, string routeUrl, string physicalFile, bool checkPhysicalUrlAccess, RouteValueDictionary defaults )Example: routes.MapPageRoute("","Category/{action}/{categoryName}", "~/categoriespage.aspx", true, new RouteValueDictionary {{"categoryName", "food"}, {"action", "show"}});
![Page 15: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/15.jpg)
Setting Meta Tags
ASP.NET 4 introduces the new properties MetaKeywords and MetaDescription to the Page class. The @Page directive contains the Keywords and Description attribute.
Example:Page.MetaDescription=“This is the default page”Page.MetaKeywords=“This is the default page”
![Page 16: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/16.jpg)
Better control of the viewstate
View state can be opt in ViewStateMode
• Enabled• Disabled• Inherit
![Page 17: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/17.jpg)
Setting Client ID
4 Modes
AutoID Static Inherit Predictable
![Page 18: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/18.jpg)
Chart Control
35 distinct chart typesAn unlimited number of chart areas,titles, legends, and
annotations3-D support for most chart typesStrip Lines, scale breaks, and logarithimic scalingSimple binding and manipulation of chart data.State managementBinary streamingSupport for common data formats, such as date, time
and currency.
![Page 19: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/19.jpg)
![Page 20: What’s new in ASP.NET 4.0 ?. Agenda Changes to Core Services Extensible Output Caching Shrinking Session State Performance Monitoring Permanently.](https://reader036.fdocuments.in/reader036/viewer/2022083009/5697bffa1a28abf838cc0953/html5/thumbnails/20.jpg)
THANK YOU !!