Recently I had to upgrade the server running one of my largest web applications and ran into an error that threw me a little.
The web application allowed clients to upload excel spreadsheets that are read by an ADO DataAdapter and written to Sql Server. The old server was running Windows Server 2003, the new server was running Windows Server 2008. Everything worked fine on the old 2003 server, however the new 2008 server just wouldn’t play nice. On uploading an excel spreadsheet the following exception was being thrown
The ‘Microsoft.Jet.OLEDB.4.0′ provider is not registered on the local machine.
Thankfully the solution to the problem was a simple one. IIS on Windows Server 2008 was running its application pool in 64 bit mode. There are no 64 bit Jet drivers. Simply changing the application pool to run in 32 bit mode enables support for the 32 bit Jet drivers.
To do this right click on the target application pool in IIS, select Advanced Settings and change Enable 32-Bit Applications to True.
If you want to check that you have the latest version of the Jet drivers goto c:\Windows\SysWOW64, right click on the Msjet40.dll file, select the details tab and view the version number. At the time of writing the latest version was 4.0.9704.0. You can view more details on this process at http://support.microsoft.com/kb/239114