After finishing the web application and publishing it online no matter I try I keep getting the following error, keep in mind that it runs locally as it should...
In case you encounter this during debugging on your Visual Studio running on a 64-bit operating system, and your application is a 32-bit, set your configuration manager to x86 (32 bit). This agrees to the previous answer to the set IIS to enable 32-bit application on 64-bit.