Everything a Developer Needs to Know
           About IIS 7 & 7.5


            Andre Magni, ME
    MCT, MCITP, MCPD, MSF ...
Agenda

 IIS Architecture
 Application Pools
 Integrated Pipeline & Creating Modules
 Hosting Applications & WCF Services
What’s new for developers

    New architecture with an Integrated pipeline
    which provides great extensibility
    Con...
Agenda

 IIS Architecture
 Application Pools
 Integrated Pipeline & Creating Modules
 Hosting Applications & WCF Services
IIS Architecture
                                            Application pool
                      Configuration

       ...
IIS Architecture – HTTP Request Processing
                                                             w3wp.exe
         ...
IIS Architecture – configuration files


Machine.config       Root web.config          Site               Application
    ...
Architecture

    Demo: Configuration files
    Demo: UI




8
Agenda

 IIS Architecture
 Application Pools
 Integrated Pipeline & Creating Modules
 Hosting Applications & WCF Services
Application Pools

     A set of w3wp.exe that share the same
     configuration
     Isolation
     • Better security, re...
Application Pools

     Classic .NET AppPool – Classic Mode (pipeline)
     • Backward compatibility with IIS 6.0
     • A...
Application Pools – Security

     Identity
     • Determines the identity of the w3wp.exe
Identity Type               Use...
Application Pools

     Demo: Configuration




13
Agenda

 IIS Architecture
 Application Pools
 Integrated Pipeline & Creating Modules
 Hosting Applications & WCF Services
Integrated Pipeline

     Allows services provided by both native and
     managed modules to apply to all requests
     E...
Integrated Pipeline
Stage                  Description / Event
Begin Request          Starts request processing.
        ...
Integrated Pipeline (cont.)
Stage             Description / Event
Execute Handler   Handler executes the request
        ...
Integrated Pipeline

     Modules
     • Participate in the request processing of every request
     • Managed modules: im...
Integrated Pipeline

     Demo: Configuring Modules




19
Creating Modules

     Use Class Library template
     Add reference to System.Web.dll
     Implement the interface
     S...
Creating Modules

     Demo: Creating a custom module




21
Agenda

 IIS Architecture
 Application Pools
 Integrated Pipeline & Creating Modules
 Hosting Applications & WCF Services
Hosting Applications

     Applications can have their own Application
     Pool, Virtual Directories cannot
     Differen...
Hosting Applications

     Demo: Configuring Applications




24
Hosting WCF Services

     WAS: Windows Process Activation Service
     Non-HTTP protocols:
     • TCP Listener Adapter
  ...
Hosting WCF Services

      Enable WCF Non-Http Activation Components
      Windows components
      Bind desired Web site...
Hosting WCF Services

     Demo: Hosting WCF Services




27
Q&A
Thank you!



     Andre Magni
amagni@springhouse.com
Stay Connected with Springhouse

            www.linkedin.com/companies/201280



            www.facebook.com/springhouse...
Upcoming iLearn Topics
Spend an hour over lunch (12pm – 1pm ET) with a
live presentation and demonstration of topics      ...
There is no need to travel to take a live,
instructor-led class with Springhouse. You
can stay at home or at your office a...
Buy 2 Classes, Get 1 Free! Or Buy 1 Class, Get 2nd for Half Price!
What’s In It For Me?                               Spri...
Upcoming Windows 7 Migration Clinics
Exton, PA – May 13th                      Event Overview
Malvern, PA – June 29th
Rest...
Upcoming SlideShare
Loading in …5
×

Philly Tech Fest Iis

1,233 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,233
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Philly Tech Fest Iis

  1. 1. Everything a Developer Needs to Know About IIS 7 & 7.5 Andre Magni, ME MCT, MCITP, MCPD, MSF Practitioner Training Manager
  2. 2. Agenda IIS Architecture Application Pools Integrated Pipeline & Creating Modules Hosting Applications & WCF Services
  3. 3. What’s new for developers New architecture with an Integrated pipeline which provides great extensibility Configuration Files WAS with non-HTTP based application support Choose between ASP.NET, Classic ASP, PHP, PERL, ColdFusion, Ruby, … 3
  4. 4. Agenda IIS Architecture Application Pools Integrated Pipeline & Creating Modules Hosting Applications & WCF Services
  5. 5. IIS Architecture Application pool Configuration w3wp.exe SvcHost.exe WWW Windows Publishing Process Service Activation (W3SVC) Service (WAS) User Mode Kernel Mode HTTP.sys 5
  6. 6. IIS Architecture – HTTP Request Processing w3wp.exe applicationHost.config Begin Request Authenticate Request SvcHost.exe Authorize Request WWW Windows Publishing Process Service Activation (W3SVC) Service (WAS) End Request User Mode Kernel Mode HTTP.sys 6
  7. 7. IIS Architecture – configuration files Machine.config Root web.config Site Application web.config web.config <system.Web> <system.Web> Applicationhost.config <system.webServer> <system.webServer> Web.config has a 100Kb file size limit. On HKLMSoftwareMicrosoftInetStpConfiguration Create MaxWebConfigFileSizeInKB (DWORD) with your value 7
  8. 8. Architecture Demo: Configuration files Demo: UI 8
  9. 9. Agenda IIS Architecture Application Pools Integrated Pipeline & Creating Modules Hosting Applications & WCF Services
  10. 10. Application Pools A set of w3wp.exe that share the same configuration Isolation • Better security, reliability, and availability To Consider: • Predefined Application Pools • Classic .NET AppPool vs. DefaultAppPool • Security • Web garden and other configurations 10
  11. 11. Application Pools Classic .NET AppPool – Classic Mode (pipeline) • Backward compatibility with IIS 6.0 • Aspnet_isapi.dll is responsible for ASP.NET processing • Should be used only if the Integrated mode fails DefaultAppPool – Integrated Mode (pipeline) • IIS and ASP.NET runtime is integrated • Based on modules 11
  12. 12. Application Pools – Security Identity • Determines the identity of the w3wp.exe Identity Type Used when… Application pool identity Accessing all files necessary for the execution of w3wp Accessing web.config Running FastCGI (by default) Running ASP.NET applications (by default) Authenticated user Accessing static files Running ISAPI extensions Runing CGI (default) FastCGI (if impersonation is enabled) Running ASP.NET (if impersonation is enabled) VirDir fixed Credential Accessing all application content 12
  13. 13. Application Pools Demo: Configuration 13
  14. 14. Agenda IIS Architecture Application Pools Integrated Pipeline & Creating Modules Hosting Applications & WCF Services
  15. 15. Integrated Pipeline Allows services provided by both native and managed modules to apply to all requests Eliminates duplication of several features in IIS and ASP.NET Simplifies site and application management Allows easy IIS extensibility by managed modules 15
  16. 16. Integrated Pipeline Stage Description / Event Begin Request Starts request processing. BeginRequest event. Authenticate Request Authentication. AuthenticateRequest event. Authorize Request Authorization. AuthorizationRequest event. Resolve Cache Is the response cached? If so, return it. ResolveCacheRequest event. Map Handler Which handler should be used MapRequestHandler event. Acquire State Retrieve the required state for the request. AcquireRequestSate event. Pre-execute Handler Preprocessing taks if needed PreExecuteRequestHandler event. 16
  17. 17. Integrated Pipeline (cont.) Stage Description / Event Execute Handler Handler executes the request ExecuteRequestHandler event. Release State Releases the request state. ReleaseRequestState event. Update Cache Updates the cache. UpdateRequestCache event. Log Request Request is logged. LogRequest event. End Request Request is about to complete. EndRequest event. 17
  18. 18. Integrated Pipeline Modules • Participate in the request processing of every request • Managed modules: implement System.Web.IHttpModule Handlers • Responsible for the request and producing the response for specific content types • Managed handler: implement System.Web.IHttpHandler or System.Web.IAsyncHttpHandler 18
  19. 19. Integrated Pipeline Demo: Configuring Modules 19
  20. 20. Creating Modules Use Class Library template Add reference to System.Web.dll Implement the interface System.Web.IHttpModule On Init(HttpApplicationContext context) subscribe for the appropriate event Write the code for your event Deploy: • Option 1: bin folder of your site (if site specific) • Option 2: GAC Add to pipeline 20
  21. 21. Creating Modules Demo: Creating a custom module 21
  22. 22. Agenda IIS Architecture Application Pools Integrated Pipeline & Creating Modules Hosting Applications & WCF Services
  23. 23. Hosting Applications Applications can have their own Application Pool, Virtual Directories cannot Different applications running on the same site can have different configurations 23
  24. 24. Hosting Applications Demo: Configuring Applications 24
  25. 25. Hosting WCF Services WAS: Windows Process Activation Service Non-HTTP protocols: • TCP Listener Adapter • Named Pipes Listener Adapter • MSMQ Listener Adapter No hosting code required, but requires a .svc file <%@ServiceHost language="c#" Service="namespace.class"> 25
  26. 26. Hosting WCF Services Enable WCF Non-Http Activation Components Windows components Bind desired Web site (usually default) to a non– HTTP port to support non–HTTP-based activation appcmd set site "Default Web Site" - +bindings.[protocol='net.tcp',bindingInformation='808:*'] appcmd set app "Default Web Site/MyWCFService" /enabledProtocols:http,net.tcp,net.pipe 26
  27. 27. Hosting WCF Services Demo: Hosting WCF Services 27
  28. 28. Q&A
  29. 29. Thank you! Andre Magni amagni@springhouse.com
  30. 30. Stay Connected with Springhouse www.linkedin.com/companies/201280 www.facebook.com/springhouseeducation www.twitter.com/SpringhouseEduc Join in the conversation Philly TechFest hashtag #phtf10
  31. 31. Upcoming iLearn Topics Spend an hour over lunch (12pm – 1pm ET) with a live presentation and demonstration of topics What's New in Microsoft 5/17/2010 Office 2010 such as: • SharePoint Document Libraries An Overview of ITIL 5/20/2010 • Project 2007/Project Management Tips & Tricks IIS 7.0 for Developers 6/1/2010 • Windows 7 for IT Pros • Office 2007 and Office 2010 Project Management Tips 6/14/2010 • and many more and Tricks Common Tasks with 6/24/2010 Just visit www.Springhouse.com/iLearn to learn more PowerShell and register for a FREE webcast! Microsoft Excel 2007: 6/28/2010 Tips and Tricks
  32. 32. There is no need to travel to take a live, instructor-led class with Springhouse. You can stay at home or at your office and join a class via Springhouse CONNECT, our Remote Learning System. • Participate in the live instructor-led classroom demonstrations and labs • Interact with the instructor and students, via high-quality conferencing equipment • View the Instructor's Presentation, Whiteboard and Demonstrations • Get remote hands-on help from the Instructor during labs and demos Take ANY class via Springhouse CONNECT. Learn more at www.Springhouse.com/CONNECT
  33. 33. Buy 2 Classes, Get 1 Free! Or Buy 1 Class, Get 2nd for Half Price! What’s In It For Me? Springhouse is making it easier for you and • You’ll Gain New Skills! your organization to gain new skills and • You’ll Save Money! increase productivity while maximizing your budget. • You’ll Increase Your Productivity! For full details of the program visist How Do I Take Advantage? www.Springhouse.com/Summer-of-Learning Visit www.Springhouse.com and select any course scheduled to run between May 31, 2010 and September 6, 2010. Enroll in the course using Promo Code: SUMMER2010 A Springhouse representative will contact you to register for the other discounted course.
  34. 34. Upcoming Windows 7 Migration Clinics Exton, PA – May 13th Event Overview Malvern, PA – June 29th Reston, VA - May 14th This one-day Windows 7 Migration Richmond, VA – June 2nd & 11th Clinic dives deep into the migration Washington, DC – June 30th and deployment planning strategies for Windows 7. Through a series of in-depth presentations and exercise For full event details and registration demonstrations, we will highlight the visit www.springhouse.com/events new tools and technologies designed to enable successful Windows 7 migrations and deployments.

×