IIS7 Managed Extensibility: Solution Structure

OK – let’s wrap up the last posts.

An IIS7 feature consists of three assemblies:

  • The HttpModule/Handler
  • Server Management
  • Client UI

All three assemblies should be in the GAC (you can avoid the GAC for the HttpModule/Handler) if you only want to use it locally in an application, but the other two must be in the GAC. So you need a strong name (all the usual security implications apply…).

I think the following assembly/namespace naming and separation of functionality makes sense (and also mostly resembles the layout of the built-in features):

  • HttpModule Assembly
    Name: LeastPrivilege.ServerHeader.dll
    Namespace: LeastPrivilege.ServerHeader
    Contents: HttpModule
  • Server Management Assembly
    Name: LeastPrivilege.ServerHeader.Management.dll
    Namespace: LeastPrivilege.ServerHeader.Management
    Content: ModuleService, ModuleProvider, ConfigurationSection*
  • Client UI
    Name: LeastPrivilege.ServerHeader.ManagementClient.dll
    Namespace: LeastPrivilege.ServerHeader.Management
    Content: Module, ModuleProxy, UI

* I chose to put the ConfigurationSection into the server management assembly. The HttpModule has a dependency on that class but this is OK since the HttpModule and the server management assembly will always be on the same machine.

Next post: Deployment (sigh).

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s