Thursday, 19 November 2009

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine under IIS7

Situation : You'll get the following error when you try to run an ASP.NET or ASP application under IIS7 that uses the Jet connection string.
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

What Happened : Unfortunately the Jet database engine is a 32bit only and won't run on a 64bit version of IIS, to get around this we can make a 32bit Application Pool and then run the website under this pool.

  • Open up IIS Manager and navigate to the server in question, right click on Application Pools and select the Add Application Pool.. menu item.

  • When the Add Application Pool Dialog pops up create a new application, call it something like 32 bit Application , similar to below


  • Click the OK button, select the newly created item from the Application Pools list then click on the Advanced Settings... link in the right hand Actions pane
  • When the Settings dialog is displayed, switch the Enable 32bit Applications option to True as shown here


  • Press the OK button to return to IIS manager
Now what all that junk basically does is set you up the ability to run 32bit web applications in parrellel with your 64bit applications on the same IIS server, the only thing left to do is specify your web application to run using this application pool.  So....

  • Right click your web applications folder from the sites treeview as below and select Managed Applications then Advanced Settings...
  • When the Advanced Settings dialog appears select the Application Pool option and then specify the application pool you created earlier
  • Press the OK button then the OK button again, from this point you should be OK and your application should run in 32bit mode and get Jet working.

Lesson Learned : Try not to use Jet in the future, or if you have to make sure you have a 32bit application pool to run it on. Although I did have additional problems after this, namely "HTTP Error 503. The service is unavailable" when running 32bit Web App on 64bit IIS and
Error 500.19 when using a 32-bit application pool

No comments:

Post a Comment