1

I get the following exception

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

though I have installed

'Microsoft.ACE.OLEDB.12.0' 
  • In my local dev machine I have also office 2010

What is wrong?

Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
Bick
  • 17,833
  • 52
  • 146
  • 251
  • 1
    This is a very common problem. Look at the list of the RELATED questions on the right side. An example http://stackoverflow.com/questions/11078675/the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine-i – Steve Aug 27 '13 at 08:57
  • see -> http://stackoverflow.com/questions/6649363/ – Bernhard Aug 27 '15 at 12:04
  • even reinstalling the AccessDatabaseEngine software will solve this issue. my system is 64 bit os, but 32 bit office products are installed. so i reinstalled 32 bit AccessDatabaseEngine. now exception is gone.! – Pranesh Janarthanan Jun 28 '16 at 14:58

6 Answers6

13

If you system is 64 bit,Then you have to change your pool settings to allow 32 bit applications that is OLEDB. ,then this link might help.

http://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx

user1335958
  • 374
  • 3
  • 5
1

I have searched for a solution to this issue for a long time and finally i did find.

My System: IIS (Version 7.5.7600.16385) is running on a 64-bit.

First you have to install "AccessDatabaseEngine" you can find the exe below

http://www.microsoft.com/en-us/download/details.aspx?id=13255

After you install it to your server you have to do one more thing.

Go to your application pool and change "Managed pipeline mode" to Classic.

That's it!!

Now you can use "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[SOURCE];Extended Properties=Excel 12.0;" connection string

suizec
  • 11
  • 1
  • That worked fine, but I had to **change application pool settings to allow 32 bit applications** as well. Also note that I had to use the 32 bit version even on a 64-bit web server. – Matt Oct 15 '14 at 11:21
0

convert to data base to .mdb. To convert you .accdb file to .mdb check this link convert and change connection string like this

<add name="ConnectionString4" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:/HostingSpaces/persistanceplus/doaminname.com/wwwroot/Database3.mdb"/>

this is best solution of this problem.

laaposto
  • 11,835
  • 15
  • 54
  • 71
0

It may be problem with your project configuration settings. If it set to Any CPU it cannnot work properly. You should specify x86 or x64 configuration (depends on installed OLE provider version. Detailed instruction here

druss
  • 1,820
  • 19
  • 18
0

Right click on the project and select the bottom most option that is properties, and uncheck "prefer 32-bit" in build tab

enter image description here

Thanks and Regards, Rk_Hirpara

RkHirpara
  • 175
  • 1
  • 5