I needed to troublehoot some active directory calls in my code–recompiling was a pain. The solution is to add this into you web.config file and add a reference to the dll that is registered in the GAC. Check that the dll on your server has the same public key token (c:\windows\assembly) and version #.
Thanks to http://www.velocityreviews.com/forums/t104353-imports-system-directoryservices-problem.html