Description
Course info
Rating
(171)
Level
Intermediate
Updated
Sep 20, 2011
Duration
2h 47m
Description

Since IIS 7, the once monolithic web server has been broken up into about 40 components so a web server can be setup with only what it actually needs which reduces its security exposure and memory footprint. The architecture also facilitates replacing built in functionality with our own implementations. Support for HttpModules and HttpHandlers allow the web server to be extended using familiar managed .NET code rather than the previous ISAPI techiniques that required unmanaged C or C++. Great new diagnostic features provide the ability to save information about failed requests and allow inspection of worker processes and active requests running in the web server. The Microsoft.Web.Administration can also be used to write managed code that can create IIS web sites, application pools, or virtual directories.

About the author
About the author

Robert is a Microsoft MVP, a Progress Developer Expert (Fiddler), and a 3rd degree black belt in Tae Kwon Do. He regularly speaks at national and international events.

More from the author
Responsive Web Images
Beginner
1h 55m
Jun 27, 2016
Useful jQuery Plugins
Intermediate
3h 6m
Jan 17, 2014
More courses by Robert Boedigheimer
Section Introduction Transcripts
Section Introduction Transcripts

Introduction
Hi. My name is Robert Boedigheimer. Welcome to Pluralsight's course on Extending IIS 7. 5 with Modules and Handlers. In this first module we're going to look at the general architecture of IIS and the major components that make up the web server. We're going to see how since IIS 7 IIS has now been broken up into components or modules so it's much easier to install only what is required for a given web server. We're going to look at the configuration system, which builds heavily on the. NET XML-based configuration system. We're also going to see how administrators can selectively allow web developers to put configuration sections in their own web config that influence how IIS is going to behave. We'll see the new integrated pipeline, which merges the original IIS request pipeline with ASP. NET processing in one single pipeline for each request. We're also going to look at extensibility, the ability to use managed. NET code to influence and change how IIS itself works. We can change how the IIS manager looks, and we can even add in custom configuration sections for our own code.

HttpModules
In this module we're going to learn about what is an HttpModule, what defines a module, how do you create one. We're going to look at a built-in module, the ASP. NET OutputCache module. We're going to create our own error logging module, which will allow us to capture unhandled exceptions for our websites, write them out to the event logs so we can see what's going on with our servers. We're going to look at a delay module, which seems like an odd thing, but we'll talk about why that might be useful. We're also going to look at a server mask module, which will help prevent people from being able to easily gain access to information about what your server is running as far as what version of IIS, what version of ASP. NET. With that example we're going to see how we can extend the configuration systems. We can make a custom section particularly for the server mask module. And we'll also learn how to store that module in the GAC, the Global Assembly Cache so that it could be shared across multiple websites.

HttpHandlers
In this module we're going to study what is an HttpHandler, we're going to look at a common handler provided by ASP. NET for tracing capabilities, we're going to look at a handler that would allow you to remotely clear cache variables, we're going to discuss generic handlers,. ashx files, and how those compare to normal HTTP handlers, we're going to look at a handler that will return the server name for a machine in a web farm, and lastly we're going to look at handlers involved with Ajax. We're going to show how jQuery can make calls to Ajax handlers and why might we want to do that instead of having it call aspx pages.

Managing IIS and Diagnostics
In this module we're going to take a look at Failed Request Tracing. You'll see the code word occasionally, FREB, which was originally used for this feature, but this is the ability to set up IIS so that if certain status codes occur like a 500 or if a page takes too long to process it'll save off a copy of the file so that you can go look at what the request execution looked like. We'll talk about the Runtime Status Control API, which allows you to peak into what IIS 7 is doing as far as processing for app pools, worker processes, and requests. We're going to look at the Microsoft. Web. Administration. This is an assembly that allows me to gain access to creating websites or creating virtual directories from managed code. We're going to talk briefly about virtual directories. These have been around for a long time, but they're something that typical ASP. NET developers do not seem to be taking advantage of, so we'll talk about that briefly. We're going to look at IIS log and how IIS Status Codes are set and how you can use LogParser to write queries that will give you information about how your website is processing requests, what are the biggest requests, what are taking the longest time, how much time are all of your ASP. NET pages taking so you get some feeling about your runtime environment by looking at your IIS logs.