I lost some time this morning due to this exception:
System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
My scenario is that I have migrated a asp.net website from an aging Windows 2003 bit server to a spanky new Windows 2008 64-bit effort. The app uses Jet Ole DB 4.0 to read uploaded Excel spreadsheets and move the contents to our database.
I checked c:\window\SysWoW64
and there they are msjetoledb40.dll msjet40.dll etc, so Jet 4.0. Odd. It turns out that IIS7 disables 32-bit applications by default, you need to enable them through the app-pool settings. Instructions (and where I got the solution from!) here:
nkadesign blog windows 2008 the microsoftjetoledb40 provider is not registered on the localmachine/