I ran into a new error today:
Could not load file or assembly 'ClientPortal' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Turns out it was caused by referencing a 3rd party assembly built for 32 bit, on my 64 bit machine. The fix was easy once I found it. Just need to open IIS Manager, right click on the application pool that is hosting the web site, and click Advanced Settings. Then change "Enable 32-Bit Applications" to True.