New Log Reporting, Database Management, and other cool admin modules for IIS 7

One of the core priorities we focused on when building IIS 7 was to enable a rich .NET extensibility model that provides developers with the hooks to easily plug-in and extend the web server. 

These extensibility hooks are provided in the web-server pipeline (enabling scenarios like the new IIS7 Bit Rate Throttler), within the configuration system (enabling developers to create new web.config schema settings), within the health monitoring system (enabling developers to add custom trace events), and within the admin tool (enabling developers to plug-in new admin UI modules).

We added these extensibility hooks so that anyone can easily extend and enhance the web server using .NET.  We also selfishly wanted them so that we can ship regular feature packs that add additional features to the core web server.

IIS 7 Admin Pack Preview 1 Released

Last week the IIS team shipped the first technical preview of some really cool administration modules that I think web developers will find super useful.  This preview adds several new features to the IIS7 Admin Tool:

  • Database Manager: Built-in SQL Server database management, including the ability to create, delete, and edit tables and indexes, create/edit SPROCs and execute custom queries.  Because it is integrated in the IIS administration tool it all works over HTTP/SSL - which means you can use the module to remotely manage your hosted applications (even with low-cost shared hosting accounts), without having to expose your database directly on the Internet.

  • Log Reports: Built-in report visualization with charting support for log files data.  Full range selection and custom chart creation is supported, as well as the ability to print or save reports.  Like the database manager you can use this module remotely over HTTP/SSL - which means it works in remote shared hosting scenarios.

  • Configuration Editor: This is a power module that provides complete control over editing all web.config settings within the admin tool.  You can configure it to track the changes you make using the UI and have it auto-generate configuration change scripts that you can then save and tweak to re-run later in an automated way.

  • Request Filtering UI: This admin module provides more control over the new request filtering feature in IIS7.  Check out Carlos' blog post here for details on how to use it.

  • .NET Authorization: This admin module provides a custom authorization rules editor which allows you to more easily manage the ASP.NET <authorization> configuration section.

  • FastCGI UI: This admin module provides more support for editing all the new <fastCGI> settings (for when you use FastCGI modules with IIS7 like PHP).

Below are some screen-shots and simple walkthroughs of the Log Reporting and Database Manager administration UI modules:

Log Reporting Admin Module

Have you ever deployed a web application onto a server and wondered how much load it is getting?, what the average response time from the server is?, or whether many server errors are occurring (and if so on what URLs)?  All of these settings are carefully logged by IIS in a text based log file.  Today most people use command-line tools like the IIS Log Parser utility to query and analyze these files.

The IIS 7 Admin Pack and the new "IIS Reports" admin module now enable you to also query and chart your reports graphically within the IIS admin tool:

Out of the box the "IIS Reports" admin module comes with a bunch of pre-built logparser-based reports that you can easily run on your sites and applications:

Below is a simple graphical report we could pull up that looks at the HTTP status codes being returned by my "TestSite" application (note how we are using the "bar graph" visualization option):

Reports can optionally be filtered using a date range.  You can also push the print or save buttons within the report page to generate a printer or a local saved version of the report.

The IIS7 Admin Tool is a rich client application (built using WinForms) - but it does all of its remote access and work using HTTP based web-services that connect to the remote web-server.  This means it will work through firewalls, and a hoster does not need to open up ports in their network in order to enable it. 

Once a hoster installs the IIS 7 Admin Pack on their web-servers, remote customers managing their hosted sites using the IIS admin tool (which is built-into Vista and available as a download for Windows XP clients) will automatically be prompted to enable the IIS Reports admin module (the install of the client-side module is seamless).  They'll then be able to use the reports module inside their admin tool to pull up reports for their remote hosted sites.

Note: hosters can optionally disable this feature if they want, or choose to restrict or customize the list of reports provided.  Hopefully most hosters will chose to just make this a standard feature of all IIS and ASP.NET plans they offer.

Database Manager Module

Have you ever deployed your application and database to a remote hosting provider and wanted to make a quick change to the database (but your hosting provider didn't support accessing it using the SQL admin tool)?  Using the new "database manager" module within the IIS admin tool you can now remotely access your database and make changes to it using HTTP/SSL through the web-server. 

Just connect your IIS administration tool to your remote site and click the new "Database Manager" icon:

By default the Database Manager module will look at the <connectionStrings> section of your web application's web.config file, and allow you to easily access any of the databases your hosted application is using. 

For example, below my TestSite application has a "NorthwindConnectionString" setting in the <connectionStrings> section of my web.config (which is why it shows up in my list of connection nodes).  When I click it I can view and edit my SPROCs and Table Schema (including indexes):

We could right-click on any table to edit the row data within it, or alternatively perform a custom SQL query to retrieve a custom set of data:

What is nice is that a hoster can easily enable all of the above database admin features for both dedicated and shared hosting plans (even when there are hundreds or thousands of customers on a single server).  Like all other modules in the admin tool, all communication between the rich client front-end and the backend at the hoster is done over HTTP/SSL based web-services (meaning it goes through firewalls and doesn't require the hoster to open any new ports - nor expose the SQL server directly on the Internet). 

Hopefully this database administration module will just be a standard feature that all IIS hosters enable - which will make remote hosted data management much easier going forward.

Summary

Over time you'll see even more admin UI modules be shipped in the IIS 7 Admin Pack and many more features enabled (Carlos, who runs the dev team building the admin tool, is actively asking for suggestions on what you'd like to see via his blog - so drop him a comment if you have a suggestion or want to provide some encouragement).

You can download the first technical preview of IIS 7 Admin Pack release here as well as learn more about it via the online documentation here.  The above modules work with both the IIS7 release in Vista SP1 as well as Windows Server 2008.

Hope this helps,

Scott

Published Wednesday, March 26, 2008 1:47 AM by ScottGu

Comments

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 5:29 AM by Abhijeet Rajwade

That is fantastic. That will really save our time for generating reports.

Thanks.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 6:07 AM by Muhammad Adnan

awesome features and like your phrase of being selfish :D

i was just wondering, if you write about webGarden and WebFarms support given by IIS7 and wanted to know what extra features IIS7 gave for them.

thanks

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 6:41 AM by Andre

Hi Scott,

I've got windows vista home premium and I tried to install but got the following error:

Method not found: 'System.Collections.Generic.ICollection`1<System.String> Microsoft.Web.Management.Server.ManagementConfigurationPath.GetBindingProtocols(System.IServiceProvider)'.

Does that mean I cannot use with my vista's version?

Thanks,

Andre.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 6:56 AM by Andy

Looks brilliant. Allowing these admin features for shared hosting is a fantastic idea. Makes Windows 2008 hosting a real "platform" with very unique sell-able features.

Though easier backup of databases - somehow building this into the remote management tools - remains my concern for shared hosting. Something to give clients peace of mind if anything.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 6:59 AM by Ozgur Ozvaris

Thanks for all of the great info.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 7:35 AM by Parag Kantharia

Hello Scott,

Is it possible to Create, Attach, Detach and backup Database with this new DataBase Manager Module...?

When can i see/read more about this Module..?

Thanks for such great modules and Blogs

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 7:47 AM by Lee E

This looks awesome!

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 8:03 AM by Fredrik

Great News

BTW.. is it possible to adopt few advantages of DotNetControl Panel for this DataBase Manager Module. i.e Attach/Detach/Backup/Restore etc with just few clicks.

Can you link us to a mini tutorial, how to include aspnetdb in Database from local machine to Remote Database. What i mean to explain is using aspnet_regsql to create aspnetdb on Remote Database.

This will the most useful advantage.

How about blogging little on Web Admin Tool advantage to manage Roles/Authentication. I understand this now works on remote machine too, which lacked with IIS6.

Thanks

Fredrik Williams

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 8:53 AM by Steve Hobbs

This all looks very cool!

Quick question though - is there (or will there be) a version of IIS7 I can run on my personal desktop PC for development?

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 9:32 AM by Brent

Outstanding! I can't wait to get all my stuff moved to IIS 7!

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 10:18 AM by ScottGu

Hi Andre,

>>>>>> Hi Scott, I've got windows vista home premium and I tried to install but got the following error: Method not found: 'System.Collections.Generic.ICollection`1<System.String> Microsoft.Web.Management.Server.ManagementConfigurationPath.GetBindingProtocols

Make sure you have Vista SP1 installed (it just came out).  I don't think that the setup currently blocks on this being installed, and that exception looks suspiciously like a new SP1 method - which means that I'm guessing that you need to have Vista SP1 installed for it to work on Vista right now.  I did all of my testing on Vista SP1 for the above screen-shots and didn't have any problems with it.

Note: if you are doing the reporting scenarios you also need to install LogParser (which is currently a separate download).  Just run setup on that either before or after you install the admin pack and the reporting module will work.

Hope this helps,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 10:22 AM by ScottGu

Hi Andy,

>>>>>>> Though easier backup of databases - somehow building this into the remote management tools - remains my concern for shared hosting. Something to give clients peace of mind if anything.

Yep - full backup and restore are two options I'd also like to see implemented in the UI.  I'm going to bug them to add this feature for the next preview.

thanks,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 10:23 AM by ScottGu

Hi Steve,

>>>>>> Quick question though - is there (or will there be) a version of IIS7 I can run on my personal desktop PC for development?

Vista Home and above have versions of IIS7 built-in that you can use on your desktop client machines.  That is what I used for all my screenshots above (I'm running Vista Premium I think).

Hope this helps,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 10:59 AM by Mark Wisecarver

All works as expected on Vista Home Premium SP1.

Very well done. ;-)

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 12:14 PM by dotGicu

Database Manger really cool, I'm waiting for my shared hosting provider to enable this feature.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 12:49 PM by Richard

Scott, does the log reporting feature support load balanced servers?

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 1:44 PM by Steve Hobbs

>>>>>> Quick question though - is there (or will there be) a version of IIS7 I can run on my personal desktop PC for development?

Vista Home and above have versions of IIS7 built-in that you can use on your desktop client machines.  That is what I used for all my screenshots above (I'm running Vista Premium I think).

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks for the reply Scott. Will us Windows XP users be catered for, or is that a technical impossibility? If not, I may have just found a reason to upgrade ;)

Cheers

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 3:11 PM by Adron

That is insanely cool.  Features that have existed in 3rd party software, but definitely awesome to know that they'll come straight out of the box now.  :)

I'm sold.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 9:24 PM by Chua Wen Ching

Good stuff scott :)

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Wednesday, March 26, 2008 10:16 PM by Josh Stodola

Damn.  I can't wait to start using this!

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 1:44 AM by ScottGu

Hi Muhammad,

>>>>>> i was just wondering, if you write about webGarden and WebFarms support given by IIS7 and wanted to know what extra features IIS7 gave for them.

I'm not sure if there are new webgarden features with IIS7.  There are some important webfarm features though:

1) The ability to store all machine configuration, as well as application code, content and config on remote servers.  This allows you to configure multiple stateless web-servers in a farm and have them drive off of a common storage server.

2) The ability to use the new IIS web deploy tool to automate rolling out changes and applications to be installed on multiple machines in a webfarm.  This is an alternative approach to #1, and will support complete automation.

Hope this helps,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 1:49 AM by ScottGu

Hi MichaelD!,

>>>>>> This is great stuff, Scott!  I have been wanting to dig into creating my own IIS7.0 modules for quite some time now.  It might be tremendously beneficial to post a tutorial on how to create an IIS7.0 Hello World module.

Definitely - I think Carlos might already have a sample of this on his blog.

>>>>>> In particular, I would really like to see a LOT more support for application configuration.  I'm very surprised that this has not been an area of focus for tools and support.  In short, mucking around in XML files is as arcane as dealing with a Command Prompt.  I would love to see something very much like what Enterprise Library attempted to do with their Configuration Manager: http://www.codeplex.com/CoMan

>>>>>> That way, we're all dealing with designers property grids rather than having to tediously and laboriously fiddle with XML .config files.

I need to play around more with the "Configuration Editor" module I mentioned above in this admin pack release.  Right now it looks like it does what you are after - which is to provide a property grid editor on top of any configuration section, without having to fiddle with manual configuration files.  Once you drop a custom schema definition for your section to IIS I believe the configuration editor module will automatically surface an editor for you (no custom code required).

I'd recommend playing with it more to see if it meets your needs, and if not either send me mail or drop a comment on Carlos' blog I linked to above with suggestions on what you'd like to see it have more of.

Thanks,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 1:53 AM by ScottGu

Hi Fredrik,

>>>>>>> BTW.. is it possible to adopt few advantages of DotNetControl Panel for this DataBase Manager Module. i.e Attach/Detach/Backup/Restore etc with just few clicks.   Can you link us to a mini tutorial, how to include aspnetdb in Database from local machine to Remote Database. What i mean to explain is using aspnet_regsql to create aspnetdb on Remote Database.

The database manager module above doesn't support attach database yet (but I think they are looking at this now).  I did two blog posts about a year ago that talk a little about how you can copy and upload a database today:

weblogs.asp.net/.../recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx

and:

weblogs.asp.net/.../tip-trick-how-to-upload-a-sql-file-to-a-hoster-and-execute-it-to-deploy-a-sql-database.aspx

>>>>>>>> How about blogging little on Web Admin Tool advantage to manage Roles/Authentication. I understand this now works on remote machine too, which lacked with IIS6.

The good news is that the IIS7 admin tool has built-in support for managing roles and authentication out of the box.  This works over HTTP and enables remote administration.

Hope this helps,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 1:55 AM by ScottGu

Hi Richard,

>>>>>>>> Scott, does the log reporting feature support load balanced servers?

Good question - I'm not 100% certain.  I believe LogParser has a feature that allows you to coalese logs from multiple servers to a single report that you can query againt.  I'm not sure, though, whether the admin UI module above supports this built-in yet.  The forums on www.iis.net are probably the best place to ask to find out for sure.

Hope this helps,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 1:56 AM by ScottGu

Hi Steve,

>>>>>>>> Thanks for the reply Scott. Will us Windows XP users be catered for, or is that a technical impossibility? If not, I may have just found a reason to upgrade ;)

You'll be able to download the IIS7 admin tool on Windows XP and remotely manage an IIS7 server.  If you want to install the IIS7 runtime, though, you'll need either Vista or Windows Server 2008.

Hope this helps,

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 1:57 AM by ScottGu

Hi Casey,

>>>>>>> SharePoint has a config file – docicon.xml.  This file contains information about which icons should be associated with which doc types and also seems to contain information that is used by IE to facilitate seemless integration between SharePoint and Office products such as Word.  For example here is a sample line from this file:

Unfortunately I don't know much about SharePoint I'm afraid - so I can't help you with this one.

Sorry!

Scott

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 2:30 AM by Shyam

Thanks for the article, you are just cool.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 8:48 AM by Gregor Spowart

Hi Scott,

You're doing some great work there to make our lives as developers much easier.  Love the DB access via IIS.

Keep it up!

Gregor

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 10:58 AM by RichardD

Looks great!

Does the database admin tool prompt for login credentials, or use the credentials from the connection string in the config file? The user in the connection string should be locked down, and not have access to modify the database structure or underlying data, so the tool would be severely limited without a separate admin login.

Also, it would be nice if we could expose the pre-built reports via a web page or reporting services report, for users who don't need administrative access to the site.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 12:22 PM by David Taylor

Hi Scott,

I had some bad luck trying the admin module preview today.  

I am getting a DateTime parsing exception when using the IIS Reports section (I am wondering if it has been tested when the locale is not en-us).  If course the actual web server log files are locale agnostic, so if it is a locale issue it could be a bug with the Windows Forms based module when the locale is not the US - just guessing?

Also I could not connect to a local database in the App_Data directory using the Database Manager module (strange given the Admin Tool has no problem accessing the same database using the ASP.NET roles and users features).

Anyway - I was just playing today, so no big deal.  Obviously these are all great features, I look forward to another attempt when a more advanced beta is released.  I understand these are early alpha releases ;-)

David

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, March 27, 2008 11:43 PM by vik20000in

Good one.

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Friday, March 28, 2008 4:20 AM by dpgnet

Nice tool, why not create a tool that manage the policy for compress iis logs files? I think that isn't so strange. I have to manage every day 2 gb of logs, zip and move them by script.

bye

# re: New Log Reporting, Database Management, and other cool admin modules for IIS 7

Thursday, May 22, 2008 12:27 AM by Mark

Scott, I wonder if there is a way to connect to use the log reporting tools against an IIS6 site?

I've tried the connect to a server / site options, but only get the bland messages "Could not connect to the remote computer. Details: Unable to connect to the remote server" or the slightly more specific "Could not connect to the specified computer. Details: The remote server returned an error: (407) Proxy Authentication Required."

I'd be even happier if I could just point the reporting tool to a folder with a series of logs and have it use them - is this possible?