Solved - The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

4.54 (85 votes)

There are a number of reasons why you might get "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine" error when attempting to connect to either an accdb or an xlsx file, depending on what you are doing. This article discusses some of the causes and provides solutions first for uses involving ASP.NET, and then looking at other application uses.

First, I will dispense with the most obvious reason for the error, and that is that the provider hasn't been registered on the machine on which the application is running. The ACE provider is not installed on Windows operating systems by default. You have to install it. The ACE provider is available in two forms: Microsoft Office Access database engine 2007 and the Microsoft Access Database Engine 2010 Redistributable. The 2007 version is only available as a 32-bit component whereas the 2010 version offers both 32 and 64-bit options. You need to be careful which option you choose, because a wrong choice here is the most frequent cause for the error message.

ASP.NET Applications

If you get this error when trying to use ACE from an ASP.NET application, the most likely cause is that you have installed either one of the 32-bit versions. By default, IIS on a 64-bit operating system will run applications in a 64-bit worker process. 64-bit processes cannot load 32-bit DLLs. When a call is made to the ACE provider, the 64 bit process will attempt to locate a 64-bit DLL. If it doesn't exist, you get the error message that brought you here.

In this case you have two options. First, you can install the 2010 64-bit version. If you have the 2007 32-bit version installed, you can simply install the 2010 64-bit version alongside it. If you have the 32-bit version of 2010 installed, you need to uninstall it and download and install the 64-bit 2010 version instead. You cannot have both the 32- and 64-bit versions of the 2010 provider installed at the same time. If you are performing the installation on your development machine, you may also be constrained by the bit-ness of any existing Office installations.

The second option is to change the application pool in IIS to enable 32-bit applications. If you are using the full version of IIS, you can use the management tool to do this (Control Panel » Administrative Tools » Internet Information Services (IIS) Manager).

Click on Application Pools in the left pane, then select the application pool for the relevant site in the centre pane, and click Advanced Settings on the right:

The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

Locate the Enable 32-bit Applications entry and change False to True:

The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

IIS Express

IIS Express 7.5 only comes as a 32-bit application. Therefore the 64-bit version of ACE will not work with it. IIS 8 or greater offer both 32-bit and 64-bit options, so you can download that instead. There is no option to enable 32-bit applications in current versions of IIS Express. However, by default, Visual Studio uses the 32-bit version. You can change this from within Visual Studio by going to Tools » Options » Projects And Solutions » Web Projects » General, and choosing the appropriate option circled below:

The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

If you launch IIS Express from the command line instead, navigate to the correct folder instead. The 32-bit version is installed by default in C:\Program Files (x86)\IIS Express. The 64-bit version is installed in C:\Program Files\IIS Express. You can determine which version of IIS Express is running from the Processes tab in Task Manager:

The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

The 32-bit version is denoted by *32 as part of the Image Name.

Other Applications

Visual Studio is only available as a 32-bit application. If you try to connect to Access from within Visual Studio, you must have a 32-bit version of ACE installed. The same is true of SQL Server Data Tools, which you might use for creating SSIS packages. For other applications, you should check the bit-ness to ensure that you have an appropriate version of the provider installed. As I have already mentioned, it is perfectly possible to have both a 32-bit and a 64-bit version installed at the same time, so long as they are not both from the 2010 download site.

Alternatives

It might be that you do not have access to the IIS server to either install a version of ACE or make changes to the enable 32 bit applications. You can use the JET provider instead, which still forms part of the Windows operating system. This is only useful if you can enable 32-bit applications (or have it enabled) but can't install anything on the server. You will need to resave your accdb files to mdb files (Access 2002-2003 Database) instead. This will be fine if you haven't used any of the features that were added to Access in 2007 such as BLOBs and multi-valued fields. Excel files can simply be resaved as Excel 97-2003 Workbook (.xls). Alternatively, you can use the EPPlus library to work with Excel files in .xlsx format. It's free, open source and can be deployed with your application, removing the need to install anything.

Summary

This article looked at the reasons behind the 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error, and discussed the fact that most problems are caused by the incorrect bit-ness of the selected component. The article discussed strategies for resolving the issue, and possible workarounds if it is not possible to put the proposed resolutions into effect.

 

You might also like...

Date Posted:
Last Updated:
Posted by:
Total Views to date: 472969

27 Comments

- Warren Caulton

I have a Web Page that uploads and parses through an excel file to upload the latest sheets data to an SQL Server Table. It has worked for several Months but this month I got the {The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.}. I had to change the iis server to allow 32 bit applications using the Application Pool change you noted. So I am assuming the version that I need to install is the 32 Bit version. since it must have been the 64 bit version I had been consuming before. Is there a way for me to confirm the Bit-ness of the ACE.OLE on my box currently? and does this reasoning seem sound as to the cause of the disruption?

- Mike

@Warren,

I'm not clear as the the sudden cause of your issue. If you experienced it after you enabled 32 bit applications (did you need to do that to work with a COM object or something?), then you were previously working successfully against the 64 bit version of 2010. If that was the case, the only two possible resolutions would have been to disable 32 bit apps (i.e. reset your app to a 64 bit app) or to install the 2007 32-bit provider.

I'm not sure how you can tell if your 2010 installation is 32 or 64 bit apart from trial and error, although they might have different version numbers in the Programs and Features list.

- biswajit

inspite of installing microsoft office acesss database engine 2007 as per your instruction on my laptop of 32 bit , still the error is showing as microsftace.oledb 12.0 provider is not registered

- Mike

@biswajit

Check the spelling in your connection string.

- uttam kholiya

this tips is work is good
nice
thankyou

- Bryan

I'm building a desktop app with C#, hitting multiple ACCDB. I don't necessarily know at compile time which db I will be using at run time, so I'm manually opening the db as needed.

After getting the Provider Not Registered error and de/re-installing several times, I created a Data Source for one db. It previews the data fine.

But I cannot open the db using a hand coded connection. I copied the connection string from the Data Source, it's using:

Microsoft.ACE.OLEDB.12.0

However, I'm still getting the Provider Not Registered error when I run it. I assume I've missed something, but cannot figure out what.

- Mike

@Bryan,

You should post a question to a suitable development forum detailing what you have done and what issues you are experiencing.

- Tsvika

Great help. Enabling 32-bit Applications on IIS did the trick for me.

- Rick

Thank you! The "most obvious reason for the error" was my problem. I'm up and running! Thank you for providing the info and links to Microsoft.

- Tobias

thanks a lot. great help

- David

Thanks so much for the help, I assumed I was in trouble, but followed your solution to the most obvious reason for the error and it solved my issue!

- Vitaly

Thanks a lot!

- Ramon

Thanks a lot for this! :)

- DangThinh

Thanks a lot, good work!

- Ramakrishna

thanks... this save a lot of time for me

- mahesh kulkarni

Thanks Bro for posting this! It helped a lot for me saved time. :)

- Bilge ORAKLIBEL

Thanks Mike,
You saved my last 3 hours.
Thanks for great advices and great explainations

- Ashok Kumar

THANKS FOR YOUR SOLUTION.
YOUR SOLUTION IS VERY HELPFUL FOR MY WEBSITE.
THANKS.


Ashok Kumar

- Marianandan Arockiasamy

It helped in my project.

Thanks!

- marc

Thank you, wonderful post. Saved me a lot of time and embarrassment.

- Nemat

Installing Microsoft Access Database Engine 2010 64 bit helped me. Thanks A lot!

- Henry

This helped a lot. Thanks!

- dany

yaaaaa
you r the man
thx bro

- Evan

I dl the 2010 64 bit version and was off and running again. Thanks for putting that link up there. I love you.

- omar

thank you 100%

- JMat0

Thanks a lot!!...did a side by side install from 2007 32-bit and 2010 64 bit and followed IIS settings... and it worked for me...yeah. many thanks indeed.

- Dmitry

thank you about the VS 32-bit remark

Recent Comments

Satyabrata Mohapatra 23/07/2017 16:43
In response to Razor Pages - The Elevator Pitch
@Dale Severin You can continue to build apps using asp.net web pages....

Satyabrata Mohapatra 23/07/2017 16:40
In response to Sending Email in Razor Pages
Thanks for sharing...learned a lot...

Gfw 22/07/2017 11:53
In response to Sending Email in Razor Pages
Question... Does System.Net.Mail support SSL?...

Dale Severin 20/07/2017 03:38
In response to Razor Pages - The Elevator Pitch
I work with razor web pages extensively. I appreciate the rapid development it permits me to I am as...

Obinna Okafor 14/07/2017 01:19
In response to Routing in Razor Pages
Thank you, Mike. Good post....

Satyabrata Mohapatra 11/07/2017 16:02
In response to Routing in Razor Pages
Very powerful routing system!!...

Cyrus 05/07/2017 03:41
In response to Razor Pages - Getting Started With The Preview
How can I trim packages and services as much as possible to use just razor pages? I don’t want to to...

Harris Boyce 04/07/2017 04:17
In response to Razor Pages - The Elevator Pitch
As a developer of a couple "trivial" web pages applications used by non-profits that wouldn't have I...

Cyrus 28/06/2017 20:25
In response to Razor Pages - Getting Started With The Preview
.net core 2.0 preview 2: <a...

ojorma 17/06/2017 09:24
In response to Razor Pages - The Elevator Pitch
Finally I can say goodbye to webforms...