How do you detect the number of physical processors/cores in .net?
Environment.ProcessorCount
EDIT: available in .NET 2.0, not in .NET 1.1
Don't have enough rep for the wiki, but note that in addition to XPSP2, Windows 2003 Server SP1 and SP2 also need a hotfix to enable this functionality:
http://support.microsoft.com/kb/932370