DEV402 Extending the ASP.NET Runtime Jurgen Postelmans Microsoft Regional Director BeLux U2U.

Slides:



Advertisements
Similar presentations
WEB401 Security Practices for Web Services (Part 2) Keith Ballinger Program Manager XML Messaging Microsoft Corporation.
Advertisements

DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Web Platform Introduction With a focus on “free” Mike Taulty Developer & Platform Group Microsoft Ltd
IIS v7.0 Martin Parry Developer & Platform Group Microsoft Limited
IIS7: Building New Core Server Modules Michael Volodarsky COM406 Program Manager Microsoft Corporation.
Chris J.T. Auld Director – Strategy and Innovation Intergen MSDN Regional Director.
Satisfy Your Technical Curiosity Internet Information Services (IIS) 7.0 End-to-End Overview of Microsoft's New Web Application Server Bart De Smet MVP,
Eben de Wit Developer Advisor Microsoft
Internet Information Server (IIS)
IIS7 for Developers Leon Langleyben Chief Architect SRL Group
IIS 7: The Next Generation Web Application Server Platform Michael Volodarsky Program Manager Web Platform and Tools Team Microsoft Corporation.
05 | Configuration and Deployment Richard Currey | Senior Technical Trainer–New Horizons United George Squillace | Senior Technical Trainer–New Horizons.
OFC324 Microsoft Project Server: Putting Enterprise Project Management (EPM) To Work Sam Brooks
Building Scalable and Reliable Web Applications Vineet Gupta Technology Evangelist Microsoft Corporation
 Mark Friedman Architect Developer Division Microsoft Corporation.
April-June 2006 Windows Hosting Seminar Series Product Roadmap: IIS 7.0 Matthew Boettcher Web Platform Technical Evangelist (Hosting) Developer & Platform.
Developing an ASP.NET Application and using the Mobile Internet Toolkit Bart Vande Ghinste Developer Consultant Microsoft Belux.
DAT304 Leveraging XML and HTTP with Sql Server Irwin Dolobowsky Program Manager Webdata Group.
IT533 Lectures Configuring, Deploying, Tracing and Error Handling.
Saad Ladki Program Manager Microsoft Corporation WUX403.
IIS, Tools And Extensibility Madhur Joshi Development Lead Phone:
ASP.NET 4.0 Web Developers User Group Israel June 2009.
DBA230 Introducing SQL Server 2000 Reporting Services Jason Carlson Product Unit Manager SQL Server Microsoft Corporation.
ASP.net Architecture Jeremy Boyd, Senior Technical Lead - Intergen MSDN Regional Director – New Zealand.
DEV334 Creating Application Starting Points & Sharing Best Practices with Enterprise Templates Marc Gusmano Director of Emerging Technologies The Information.
OFC304 Excel 2003 Overview: XML Support Joseph Chirilov Program Manager.
DEV306 ASP.NET Portal Starter Kit Under The Hood Gunther Beersaerts Technical Specialist Microsoft Corporation.
OFC 200 Microsoft Solution Accelerator for Intranets Scott Fynn Microsoft Consulting Services National Practices.
The ASP.NET Server Model Martin Parry Developer and Platform Evangelism Group Microsoft
WEB 304 An Overview of ASP.NET and Windows Workflow Foundation Kashif Alam Program Manager Developer Division Microsoft Corporation.
Introduction to ASP.NET 1www.tech.findforinfo.com.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
OFC 307 Office 2003 Solution Case Studies Ray Stephenson Smart Client Technical Evangelist
Slide 1.NET Development for Project 2003 Samples from the Project 2003 SDK Jim Corbin Programmer Writer Office Developer Documentation Microsoft Corporation.
The.NET Runtime and IIS Presented by Chris Dickey – cdickey.net consulting
Reset and Recycle IIS Reset Application Pool Management Error Codes New HTTP Sub-status codes Custom/Detailed Errors Tracing in IIS7 and.
ASP.NET Architecture Internals Mike Shaw Developer & Platform Group Microsoft Ltd.
DEV333 Instrumenting Applications for Manageability with the Enterprise Instrumentation Framework David Keogh Program Manager Visual Studio Enterprise.
EBZ 321 Extending CMS 2002 Publishing Processes Scott Fynn Microsoft Consulting Services National Practices.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
DEP331 Migrating to Windows XP Mike Coleman Lead Product Manager, Windows XP Microsoft Corporation.
Virtual techdays INDIA │ 9-11 February 2011 Caching Enhancement in ASP.NET 4.0 Abhijit Jana │ Consultant, Microsoft
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
DAT300 SQL Server Notification Services: Application Development Ken Henderson Technical Lead, SQL Server Support Microsoft Corporation
DEV395 No Touch Deployment for Windows Forms Jamie Cool Program Manager.NET Client Microsoft Corporation.
EBIZ302 Jupiter Business Process Automation and Web Services David Fong Program Manager.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Configuration.
Svetlin Nakov Telerik Corporation
MSG 334 Creating Exchange Administrative Scripting for the Non-Programmer Susan Hill Lead Programmer Writer Microsoft Corporation.
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
1 ASP.NET Internals
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Alexey Polovinkin Post graduate student, CMC department.
Developing Custom ASP.NET Providers For Membership And Role Manager Stefan Schackow PRS404 Program Manager – Web Platform and Tools Microsoft Corporation.
BizTalk Damir Dobric Lead Architect. Agenda Microsoft BizTalk RFID Overview Architecture Application models Implementing Event Handlers Sensors.
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
ASP.NET Architecture Mike Taulty Developer & Platform Group Microsoft Ltd
DEV410 Inside the ASP.NET Runtime - Intercepting HTTP Requests Michele Leroux Bustamante Principal Software Architect IDesign Inc.
Building More Powerful ASP.NET Applications with IIS7 Michael Volodarsky COM303 Program Manager Microsoft Corporation.
ASP.NET Overview Brian Hitney Developer Evangelist Microsoft Corporation
Creating an Interactive Web Page Lesson 2. Objectives.
Microsoft Confidential Risman Adnan ISV Lead, Microsoft Indonesia
ASP.NET Web Forms and Web Services
IIS v7.0 Martin Parry Developer & Platform Group Microsoft Limited
ASP.NET 4 Core Runtime for Web Developers
ASP.NET 4.0 State Management Improvements – Deep Dive
ASP.NET Core Middleware Fundamentals
Presentation transcript:

DEV402 Extending the ASP.NET Runtime Jurgen Postelmans Microsoft Regional Director BeLux U2U

Agenda Role of the HttpRuntime What is the HttpRuntime The HttpContext class Extending the HttpRuntime HttpModules Global.asax HttpHandlers Hosting the HttpRuntime

Using HttpModules and HttpHandlers demo demo

Role of the Http Runtime Pluggable, modular architecture Caching, Security, State Management…. Ability to customize and extend ASP.NET Example: Perform dynamic authorization Example: Take over.xml file extension Reduce need for C/C++ ISAPIs Goal: You can do everything in ASP.NET Use any managed language, including VB.NET

HTTPRequestHandler ASP.NET Architecture Inside IIS 5.0 INETINFO.EXE (IIS 5.0) aspnet_isapi.dll ASPNET_WP.EXE Worker Process Named pipes

ASP.NET Architecture Inside IIS 5.0 HTTP.SYSHTTP.SYS User Mode Kernel Mode ASP.NET Filters Worker Process ASP.NET Filters ASP.NET Filters WASWAS INETINFO metabase AppPool 1 AppPool 2

Http Runtime Architecture HttpHandlers HttpModules HttpRuntime.asmx.aspx.ashx OutputCache Authentication SessionState Process Boundary Cache External Session HttpContext

HttpContext Everything you needed to know about the current ASP.NET Request but where afraid to ask

About HttpContext The glue that ties the pipeline together Encapsulates all request specific data Instance created for each request System.Web.HttpContext “flows” throughout request lifetime Developers can add to HttpContext HttpContext.Items collection Objects then flowed throughout request Exposed via static HttpContext.Current Code must be running on original thread

HttpContext Properties NameTypeDescription CurrentHttpContextContext for the current request ApplicationHttpApplicationStateAppliction-wide property bag ApplicationInstanceHttpApplicationApplication Context (Modules) SessionHttpSessionStatePer-client session state RequestHttpRequestThe HTTP Request ResponseHttpResponseThe HTTP Response UserIPrincipalPrincipal information HandlerIHttpHandlerHTTP Handler that will dispatch the call ItemsIDictionaryPer-request property bag ServerHttpServerUtilityURL cracking/sub handlers ErrorExceptionFirst error occured during processing

Using HttpContext demo demo

Implementing HttpModules Participate in every ASP.NET request

HttpModules Enables developers to: Extend the HTTP Pipeline Examine and modify HTTP Requests Used by ASP.NET: External Session State HttpModule Forms Authentication HttpModule Output Cache HttpModule ….

HttpRuntime Architecture HttpModules HttpRuntime HttpHandlers.aspx.asmx.ashx OutputCacheOutputCache AuthenticationAuthentication SessionStateSessionState HttpContext Output Cached Page Cache External Session

HttpModules What Are Interception Events? Request participation Methods called at specific stages of request HttpRequest HttpResponse available Terminate processing of request HttpApplication.CompleteRequest() Response.End()

Per-Request Application Events BeginRequest AuthenticateRequest AuthorizeRequest ResolveRequestCache AquireRequestState PreRequestHandlerExecute Handler Execution PostRequestHandlerExecute ReleaseRequestState UpdateRequestCache EndRequest

Creating an HttpModule Class must implement interface: System.Web.IHttpModule Init() Called when module is created Register delegates for runtime events Dispose() public interface IHttpModule { public void Init(HttpApplication application); public void Init(HttpApplication application); public void Dispose(); }

Registering an HttpModule 1. Compile into.NET assembly 2. Deploy Into application’s \bin directory or Register in the GAC 3. Register in configuration: <add name=“friendly name” <add name=“friendly name” type=“class, assembly“ /> type=“class, assembly“ />

Modules vs Global.asax Functionality of global.asax and modules overlap Global.asax supports extra events like Application_Start and Application_End Session_Start and Session_End

Response Filtering Filtering the response stream Cannot be done directly Response stream is read-only Need to implement a custom filter All output generated by ASP.NET will pass through the custom filter Response object writes result through the custom filter. Implemented using Response.Filter property

Writing Modules demo demo

Implementing HttpHandlers Taking control of the request target

What are HttpHandlers ? Are the endpoint for a request They actually process the request and generate the response (HTML, XML,…) Similar to ISAPI Extensions Examples: ASP.NET Page Handler (*.aspx) ASP.NET Service Handler (*.asmx) Server-Side XSL Transformer (*.xml) Dynamic image generation

Creating an HttpHandler Class must implement interface: System.Web.IHttpHandler ProcessRequest() ‘Main’ method of the handler IsReusable { get; } Indicates whether pooling is supported public interface IHttpHandler { public void ProcessRequest(HttpContext context); public bool IsReusable(); }

Registering an HttpHandler 1. Compile into.NET assembly 2. Deploy Into application’s \bin directory or Register in the GAC 3. Register in configuration: 4. Important: Extension must be mapped in IIS

Writing Handler demo demo

Writing an Asynchronous Handler demo demo

Hosting the HttpRuntime

ASP.NET Hosting HttpRuntime is a clean abstraction Enable non-IIS hosting scenarios System.Web.Hosting namespace Scenarios: Pre-generation of.htm for dynamic pages ASP.NET Cassini server (XP Home) See Download/Default.aspx?tabindex=0&tabid=1 for sample sourcehttp:// Download/Default.aspx?tabindex=0&tabid=1

Hosting ASP.NET demo demo

Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide User Groups Meet and learn with your peers

Suggested Reading And Resources The tools you need to put technology to work! TITLEAvailable Microsoft® ASP.NET Programming with Microsoft Visual C#®.NET Version 2003 Step By Step: Today Microsoft Press books are 20% off at the TechEd Bookstore Also buy any TWO Microsoft Press books and get a FREE T-Shirt

evaluations evaluations

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.