IIS 7.5 error: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

Today I installed Clean Windows Web Server 2008 R2 64-bit with IIS 7.5. To my surprise opening .NET 4.0 application I received the following error:


IIS 7.5 Detailed Error - 500.21 - Internal Server Error

Server Error in Application "DEFAULT WEB SITE"
Internet Information Services 7.5

[Error Summary]
HTTP Error 500.21 - Internal Server Error
Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list

[Detailed Error Information]
Module IIS Web Core
Notification ExecuteRequestHandler
Handler PageHandlerFactory-Integrated
Error Code 0x8007000d
Requested URL http://localhost:80/default.aspx
Physical Path C:\inetpub\wwwroot\default.aspx
Logon Method Anonymous
Logon User Anonymous

[Most likely causes:]
•Managed handler is used; however, ASP.NET is not installed or is not installed completely.
•There is a typographical error in the configuration for the handler module list.

[Things you can try:]
•Install ASP.NET if you are using managed handler.
•Ensure that the handler module's name is specified correctly. Module names are case-sensitive and use the format modules="StaticFileModule, DefaultDocumentModule, DirectoryListingModule".

[Links and More Information]
IIS core does not recognize the module.
View more information »

As it turns out, some glitch caused this problem, and somehow .NET was not registered with IIS.

Running the following commands solved this issue:

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

CSS first-letter problem with display:inline

According to w3.org first-letter pseudo class works only with block level elements. Here is a paragraph from w3:
The :first-letter pseudo-element must select the first letter of the first line of a block, if it is not preceded by any other content (such as images or inline tables) on its line.

Code with label that works across all browsers:
label{display:block}
label:first-letter {text-decoration:underline}

Note, that there should be a space character between first-letter and curly bracket. Otherwise it will not work in IE6. So if you want to punish IE (or your users), use:
label:first-letter{text-decoration:underline}

Remove .pdb path from exe in Microsoft Visual Studio 2010

If you look at executables shipped from Microsoft like notepad.exe, you will see that they include .pdb (Program Database) reference, but do not include path to .pdb:
notepad.pdbvs
d:\some\dir\release\bin\etc\notepad.pdb

This path can sometimes reveal unnecessary information to your customer / user, so if you want to get rid of that path in Visual Studio 2008, you could use undocumented switch:
/pdbpath:none

In Visual Studio 2010 (c++) you can use documented switch:
/PDBALTPATH:%_PDB%

Reference: Visual Studio 2010 – Visual C++ – /PDBALTPATH

Unfortunately, I can not find a such option for .net / C# executables. The only option it seems is /pdb switch, but it is not accessible from IDE.

P.S. To view .pdb reference within exe file, use Hex Editor or dumpbin utility
dumpbin /headers notepad.exe