By Will Kelly
I was drawn to the IIS-Core Server virtual lab after poking around the IIS 7.0 specifications and began to wonder about the development options including .NET and Native C/C++ modules. However, I needed a “sandbox” to play in since my dev environment was devoted to a client project and a lab manual that was detailed enough to serve as a reference down the road.

Download the lab manual and print it out because it contains the lab exercises. It can also be a useful reference to you later on.
The lab starts off with an introduction that sets the stage for the lab and a section that offers a useful review about Basic Authentication.
After the introductory and refresher material about Basic Authentication, the lab delves into its first task—Developing a Module with .NET. The lab takes the time to first examine the development of a basic authentication module that supports the http1.1 basic authentication scheme. This module uses the standard ASP.NET module pattern that has been available since ASP.NET v1.0 and the very same pattern is used to build ASP.NET modules that extend the IIS7 server. This direct approach into IIS7 Server development was most helpful to me.
After creating the class, the lab wastes no time and walks you through implementation of the Init method with registering the module for one or more request pipeline events.
Next the lab tackles how to create the AuthenticateUser method. This is an important step because at the end of this processing, if the module was successfully able to obtain and validate the user credentials, it will produce an authenticated user principal that other modules and application codes can later use in access control decisions.
After creating the AuthenticateUser method, it’s time to implement the IssueAuthenticationChallenge method following the lab’s methodical approach to module development.
The final element of the first task takes you through how to create utility methods.
The second task of the lab walks through deploying the module to the application by first presenting the options you have for deploying the module to the application. Deployment in a production environment leaves no room for experimentation so I enjoyed being able to test out various module deployment methods within the lab’s “sandbox” because I was able to play to my heart’s content.
Source code is a must have in programming labs, and the lab finishes off with appendices including the Basic Authentication Module Source Code and other supplementary information that can help fuel more ideas and show you the true power of developing for the IIS environment. You can walk through the lab yourself here:
IIS 7.0 -Core Server Virtual Lab