If you already have logging enabled and you still get this error on Windows 7 64 bit, try this in IIS 7.5:
Create a new application pool
Go to the Advanced Settings of this application pool
Set the Enable 32-Bit Application to True
Point your web application to use this new pool