Using .Net 4.0 The line of code to create the PrincipalContext is:
PrincipalContext context = new PrincipalContext(ContextType.Domain, "domain");
A while back I saw a code snippet where you don't have to specify the domain name but instead use a system or httpcontext variable to pass in the domain name. It was something like user.logondomain but I can't find it any more. It was not striping the domain off the user.identity.name.
This is using windows authentication in an ASP.NET web app.