Having worked with this a bit, I managed to get it to work.
Installing an assembly in .net 4.0 GAC will not make it available in the drop-down list of types in IIS Manager under the "Add a managed module" section.
What I needed to do:
Create a .net 4.0 class library and compile it as a strong named assembly
Install it in the .net 4.0 GAC using gacutil located in the program files (x86) \ Microsoft SDK \ Windows \ v7.0A \ bin \ NETFX 4.0 Tools
(Or make Visual Studio compile, sign, and install the assembly automatically)
Add this line under <modules> in applicationHost.config: (this needs to be done manually, this cannot be done in the manager)
<add name="MyName" type="NameSpace.ClassName" preCondition="managedHandler,runtimeVersionv4.0" />
This forces the module to launch requests to sites developed in .net 4.
It seems, however, that requests for sites developed in pre.net 4 versions cannot use the module created in .net 4.0. Therefore, if you make requests for pages on a site created in .net 3.5, the module will not work.
Another observation:
After you have added the module to IIS through the applicationHost.config file, if you open IIS Manager, highlight the server name in the connections and click the modules. You will see the .net 4 module in the list.
Double click on it and you will see the settings for it. You will see that the "Call only for requests to ASP.NET applications or managed handlers" checkbox is selected. If you remove it and click "OK", you will receive an error message that the assembly is not installed in the GAC.
But haven't I just installed it successfully in .net 4 GAC? And don't I see how the module starts in the request?
If you save the settings anyway, you will get a runtime error, and if you look in applicationHost.config, you will see that your module settings you added earlier manually have changed.
But what if I want to "Call only for requests to ASP.NET applications or managed handlers?