If encountered this error in your ASP.NET website , there’re several way to solve this issue.
- Please check if Office 2007/2010 Jet drivers already installed.
- If you’re still getting the same error like me, then you’ll have to allow the IIS application pool to run 32 bit applications :
Navigate to Server Manager > Roles > Web Server (IIS) > Internet Information Services (IIS) Manager, then right-click on your website’s Application Pool and click “Advanced Settings”:
Set the Enable 32-Bit Application to TRUE.
This should enable IIS to run 32-Bit Applications in a default x64 environment, but I was getting another error:
HTTP Error 404.2 – Not Found
The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.
After testing and digging a little deeper, I found two solutions :
1/ Migrate the website from Classic mode to Integrated Pipeline mode, and IIS will be able to run 32-Bit Applications.
If your website has httpmodules and httphandlers the manual migration process is not easy, so I advise you to update your Visual studio, recompile your website and publish it:
Microsoft Visual Studio 2008 Shell (Integrated) Redistributable Package:
Microsoft Visual Studio 2010 Shell (Integrated) Redistributable Package:
2/ Activate the 32 bit .Net framework in the ISAPI and CGI restrictions list :
– Navigate to Server Manager > Roles > Web Server (IIS) > Internet Information Services (IIS) Manager, click on the server name, open the “ISAPI and CGI Restrictions” window and allow access to the 32 bit .Net framework :
that’s all, everything should be running just fine.
- Alternative solution, Migrate to a 64-bit compatible OLEDB Jet driver version :
Here’s how to update to a new 64-bit compatible database engine:1/ Download the Microsoft Access Database Engine 2010 Redistributable, you can choose from the 32 bit or 64 bit version depending on your machine and install it on your server
2/ in your application or website code, update the connection string from “Provider=Microsoft.Jet.OLEDB.4.0; “ to “Provider=Microsoft.ACE.OLEDB.12.0;”
3/ recompile and run your application