Recent Tasks in IIS Manager 7

Talking to a good friend of mine (Daniel) about random geeky stuff, suddenly he showed me one of the features he considered very useful from the Windows Vista Control Panel. Basically they have a "Recent Tasks" at the bottom where they keep track of all the features you have used sorted by most recently used. He then suggested that we should do something similar inside IIS Manager 7 for those of us that have "task-amnesia" or are just to busy to search for it in the Control Panel.

I immediately thought that was a great idea and that it was also a good sample material to show off the complete extensibility we have built into the new IIS Manager inside Windows Vista and the next release of Windows Server.

So I decided to create the sample and share it for the IIS community including the MSI for end-users, source code and setup project for developers.

Download

To install the MRU IIS Manager Module click here.

To download source code click here.

After installing the MRUModule.msi whenever you use a feature inside IIS Manager it will keep track of the Most-Recently-Used tasks you navigate to, keeping a history per-object type (Server, Site, Application, Virtual Directory, Folder and File).

To use it just open InetMgr and navigate to any feature. Click Back in the navigation bar and you will see that the feature has been added to the list of recently used tasks in the Actions Panel.

Note: If you don't see the tasks, see the Event Viewer application log to see what could have gone wrong.

Drilling into the source code

The source code includes a Visual Studio Solution that includes three Projects:

  1. MRUModule. This project is a typical class library project that includes the actual IIS Manager extension and will be added to the GAC
  2. SetupHelper. This project is a helper library to register the ModuleProvider in IIS administration.config.
  3. Setup. This is a Setup project that builds the MSI

The way this module is implemented is very simple; IIS Manager exposes several services that give you access to the internal stuff happening inside. One of those services is the INavigationService. This service gives you all the information you need to interact with navigation, including the current item, the history and most importantly an event that notifies you whenever navigation occurs passing you the connection information as well as the page information we are navigating to.

With this event now is just as simple as keeping a simple Dictionary where we index the pages that have been visited by the ConfigurationPathType.

Finally the module also implements the IHomepageTaskListProvider interface. This interface allows developers to inject their own tasks to any home page shown inside IIS Manager. In my case I just return a set of Tasks that give a link to each of the pages.

I hope this gives you an idea on how much infrastructure and work we have invested in the new IIS Manager to make sure it offers not only a nice UI but an entire platform that gives developers the power to bake in their features and offer their users an integrated solution, including remote management over SSL and many more cool features.

1 Comment

Comments have been disabled for this content.