It builds and runs fine on your local machine but when you deploy it to the server, all kinds of problems arise. Before you spent countless hours chasing ghosts, make sure you have your .NET projects on the same page, namely building for the right .NET Framework and targeting the right platform.
Open your project properties bag and try these first and then narrow it down. First, make sure your target frameworks for all your projects are in synch.
Then make sure you give yourself as much latitude as you can by setting your platform target to Any CPU:
Once you know your project and its dependencies are all on the same page and you still have problems on your deployment target, then go ahead and spend countless hours chasing ghosts.