IIS Manager provides a lot of extensibility points for developers, one of them is the new Home page or Control Panel. The new Home page allows end users to group their features based on different types of categories, including Area (IIS, ASP.NET and Management) and Category (Application Development, Security, Server Features, etc).
When you are registering a new page for IIS Manager you get to choose where you want your page to be shown, including the option of adding your own category to it. All of this is done through the IControlPanel interface and the related ModulePageInfo, ControlPanelCategoryInfo and ControlPanelCategorization. The following illustration explains what each class represents.
The following code shows how you can register a new page in the IIS Manager Control Panel:
However you can also use any of the existing categories:
You can also provide a categorization category for your page:
Finally you can also create your own categories. Note that you should register your category only once and before using it to register a page, this is important if you are registering a lot of pages from different modules.
You can download the code for this sample:
You can also extend the set of Tasks shown in the Home page, that is done through the IHomepageTaskListProvider or the new HomePageExtension which provides additional support, but I will leave this for a future blog.
A couple of years ago a friend of mine introduced me to a game called Sudoku, and immediately I loved it. As any good game its rules are very simple, basically you have to lay out the numbers from 1 to 9 horizontally in a row without repeating them, while at the same time you have to layout the same 1 to 9 numbers vertically in a column, and also within a group (a 3x3 square).
After that, every time I had to take a flight I got addicted to buying a new puzzles magazine that would entertain me for the flight. On December 2006 while flying to Mexico I decided to change the tradition and instead build a simple Sudoku game that I could play any time I felt like doing it without having to find a magazine store and that turned into this simple game. It is not yet a great game since I haven't had time to finalize it, but I figure I would share it anyway in case someone finds it fun.
Click Here to go to the Download Page
I have just uploaded a new application that extends IIS Manager 7 for Windows Vista and Windows Longhorn Server that adds a new Reports option that gives you a few reports of the server and site activity. Its features include:
Click Here to go to the Download Page
I'm working on a second version that will allow you to create your own queries and configure more options like Chart settings, and ore.
If you have any suggestions on reports that would be useful feel free to add them as comment to the post.
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.
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.
The source code includes a Visual Studio Solution that includes three Projects:
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.
InetMgr exposes several extensibility points that developers can use to plug-in their own features and make them look and feel just as the built-in functionality. One of those extensibility features is the hierarchy tree view and is exposed mainly through three classes:
To extend the Tree view to add your own set of nodes or context menu tasks, developers need to perform the following actions:
Tasks illustrated in this walkthrough include:
HierarchyProvider is the base class that developers need to inherit from in order to get calls from the UI whenever a node needs to be loaded. This way they can choose to add nodes or tasks to the HierarchyInfo node that is passed as an argument.
The code above creates a class derived from HierarchyProvider that implements the base GetChildren method verifying that the node that is being expanded is a ServerConnection; if that is the case it returns an instance of a DemoHierarchyInfo node that will be added to that connection. The class DemoHierarchyInfo simply specifies its NodeType (a non-localized string that identifies the type of this node), SupportsChildren (false so that the + sign is not offered in tree view) and Text (the localized text that will be displayed in the tree view). Finally it overrides the OnSelected method and performs navigation to the DemoPage as needed.
In this task we will register the hierarchy provider created in the previous task so that the HierarchyService starts calling this type to extend the tree view.
To test the feature
In this lab, you learned how to extend the tree view to customize any node on it and add your own nodes to it. You can also override the GetTasks method to provide context menu tasks for existing nodes, and you can also override the SyncSelection method to customize the way synchronization of navigation works.
Tomorrow I'll be leaving for Boston to attend TechEd 2006. This time I will be showing off the new user interface we have been creating for IIS 7, including its tons of new features as well as the new extensibility API that we have created for developers using managed code.
I'll be giving the following chalk talks:WEBTLC05 Introducing the New and Improved IIS Manager in IIS 7.06/12/2006 5:00PM-6:15PMThis talk shows off many of the new features of IIS 7's new administration UI. It includes demos of the new navigation model, as well as how the tool allows non-Windows users to configure IIS/ASP.NET settings. In addition, it shows how administrators can limit the set of features users can see/modify per site and per application. Finally, the talk demonstrates how the new tool diagnostic features provide greater request processing visibility for easier troubleshooting.
WEBTLC18 Extending the IIS Manager Tool in IIS 7.0 6/15/2006 1:00PM-2:15PMIIS 7.0 delivers a rewritten version of the IIS Manager tool that is fully extensible. This talk demonstratees how to make the most of this new extensibility platform for extending IIS UI.
See you there!
Today we launched our first public team web site. http://www.IIS.net In this web site we are publishing a lot of interesting content, from walkthroughs to videos targeting IT professionals, Web Hosters and of course my favorite… developers.
Some of my favorites are:
IIS7 Module Overviewhttp://www.iis.net/default.aspx?tabid=2&subtabid=25&i=930
ASP.NET Integration with IIS7http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=928
Overview of Runtime Status and Control Datahttp://www.iis.net/918/ItemPermalink.ashx
How to Use Microsoft.Web.Administration http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=952
And the ones I worked at:
IIS 7 Admin Tool Extensibilityhttp://www.iis.net/971/ItemPermalink.ashx
Creating a Simple UI Module http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=962&p=1
Creating a Module Page for IIS7 Administration Toolhttp://www.iis.net/963/ItemPermalink.ashx
Adding Configuration Functionality to IIS7 Admin Tool Extensions http://www.iis.net/default.aspx?tabid=2&subtabid=25&i=964
Take a look and provide us with any feedback of the content and any ideas you have for the site. We really want to engage all the community, developers, IT professionals, Web Hosters so that we can create a better product for all of you.