all about asp net 4 0 hosam kamel
TRANSCRIPT
![Page 1: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/1.jpg)
All About ASP.NET 4.0
Hosam Kamel
Senior Software Engineer
ESRI Northeast Africa
@HosamKamel
http://Weblogs.asp.net/HosamKamel1
![Page 2: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/2.jpg)
Agenda
• Overview
• Core Services
• New Features in the Microsoft Ajax Library
• Web Forms
• Dynamic Data
• Visual Studio 2010 Web Designer Improvements
• Web Application Deployment with Visual Studio 2010
• Q and A
2
![Page 3: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/3.jpg)
Core Services
![Page 4: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/4.jpg)
Core Service – Web.Config File
Minification
• Web.config (Past)
– Contains all the configuration for a Web application.
– Grown considerably over the past few releases of the .NET Framework as new features have been added, such as AJAX, routing, and integration with IIS 7
– This has made it harder to configure or start new Web applications without a tool like Visual Studio
• Web.config ( .NET Framework 4)
– The major configuration elements have been moved to the machine.config file.
– The web applications now inherit these settings.
4
![Page 5: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/5.jpg)
Core Service – Extensible Output
Caching
• Old Caching mechanism
– In memory
– Heavy traffic
– Memory consumed by output caching can
compete with memory demands from other
portions of a Web application.
• Custom output-cache providers.
– Output-cache providers can use any storage
mechanism to persist HTML content
5
![Page 6: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/6.jpg)
Core Service – Auto-Start Web
Applications
• Application_Load
• Auto-Start
– ASP.NET 4 runs on IIS 7.5 on Windows
Server 2008 R2
– Starting up an application pool, initializing an
ASP.NET application, and then accepting
HTTP request
6
![Page 7: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/7.jpg)
Core Service – Permanently
Redirecting a Page• Response.Redirect
– HTTP 302 Found (temporary redirect) response.
– An extra HTTP round trip when users attempt to access the old URLs
• RedirectPermanent– Issue HTTP 301 Moved Permanently responses.
• Search engines and other user agents that recognize permanent redirects will store the new URL that is associated with the content, which eliminates the unnecessary round trip made by the browser for temporary redirects.
7
![Page 8: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/8.jpg)
Core Service – The Incredible
Shrinking Session State
• Depending on how much information a
developer saves in session state, the size
of the serialized data can grow quite large.
• compressionEnabled="true“!
8
![Page 9: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/9.jpg)
Core Service – Expanding the
Range of Allowable URLs
• URL path lengths to 260 characters.
– (based on the NTFS file-path limit)
• To allow longer or shorter paths (the
portion of the URL that does not include
protocol, server name, and query string)
– maxRequestPathLength=“260”
• To allow longer or shorter query strings
– maxQueryStringLength="2048"
9
![Page 10: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/10.jpg)
Core Service – Multi-Targeting
• <compilation targetFramework="4.0"/>
10
![Page 11: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/11.jpg)
Web Forms
![Page 12: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/12.jpg)
Web Forms– Meta Tags
• MetaKeywords
• MetaDescription
• You can set these properties at run time.
12
![Page 13: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/13.jpg)
Web Forms– Enabling View State
for Individual Controls
• ViewStateMode property.
• Enabled, Disabled, and Inherit
13
![Page 14: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/14.jpg)
Web Forms – Changes to
Browser Capabilities
• HttpBrowserCapabilities
• ASP.NET 4, these browser definition files have been updated
– blackberry.browser - chrome.browser
– Default.browser - firefox.browser
– gateway.browser - generic.browser
– ie.browser - iemobile.browser
– iphone.browser - opera.browser
– safari.browser
14
![Page 15: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/15.jpg)
Web Forms – Routing
• ASP.NET 4 adds built-in support for using
routing with Web Forms.
• Routing lets you configure an application
to accept request URLs that do not map to
physical files.
• http://website/products.aspx?categoryid=1
2
• OR http://website/products/software
15
![Page 16: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/16.jpg)
Web Forms – Client IDs
• The id attribute in HTML that is rendered for Web server controls is
generated based on the ClientID property of the control
– ctl00_MasterPageBody_ctl01_Textbox1
• ClientIDMode
– AutoID
– Static
– Predictable
– Inherit
16
![Page 17: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/17.jpg)
Web Forms – ASP.NET Chart
Control• 35 distinct chart types.
• An unlimited number of chart areas, titles, legends, and annotations.
• A wide variety of appearance settings for all chart elements.
• 3-D support for most chart types.
• Smart data labels that can automatically fit around data points.
• Strip lines, scale breaks, and logarithmic scaling.
• More than 50 financial and statistical formulas for data analysis and transformation.
• Simple binding and manipulation of chart data.
• Support for common data formats, such as dates, times, and currency.
• Support for interactivity and event-driven customization, including client click events using Ajax.
• State management.
• Binary streaming.
17
![Page 18: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/18.jpg)
Web Forms – Project Template
Changes
• Empty Web Site
• Empty web application
18
![Page 19: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/19.jpg)
Web Forms – CSS Improvements
• controlRenderingCompatibilityVersion
• "3.5". "4.0".
• Disabling Controls
• Hiding div Elements Around Hidden Fields
19
![Page 20: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/20.jpg)
Web Forms – Project Template
Changes
• Empty Web Site
• Empty web application
20
![Page 21: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/21.jpg)
Web Application Deployment with Visual Studio 2010
![Page 22: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/22.jpg)
Issues
• Deploying to a shared hosting site.
• In an enterprise environment.
• Web deployment features in Visual Studio 2010 include the following major areas:
– Web packaging
– Web.config Transformation
– Database deployment
– One-Click Publish for Web applications
22
![Page 23: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/23.jpg)
Web Packaging
• IIS Web Deployment Tool
(MsDeploy.exe).
• Zip file + meta data– IIS settings, which includes application pool settings, error page settings, and so
on.
– The actual Web content, which includes Web pages, user controls, static content
(images and HTML files), and so on.
– SQL Server database schemas and data.
– Security certificates, components to install in the GAC, registry settings, and so
on.
23
![Page 24: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/24.jpg)
Web.config Transformation
• Transform a Web.config file from
development settings to production
settings
24
![Page 25: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/25.jpg)
Database Deployment
• A Visual Studio 2010 deployment package
can include dependencies on SQL Server
databases.
25
![Page 26: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/26.jpg)
One-Click Publish for Web
Applications
• IIS remote management service to publish
a Web application to a remote server
26
![Page 27: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/27.jpg)
![Page 28: All About Asp Net 4 0 Hosam Kamel](https://reader034.vdocument.in/reader034/viewer/2022052116/55526674b4c905d41d8b503d/html5/thumbnails/28.jpg)