Solved

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

Posted on 2010-09-24
3
1,386 Views
Last Modified: 2013-11-26
Hi All,

I have an ASP.NET C# project with uses an OleDbConnection string for Excel (XLSX) files. The connection uses the provider Microsoft.ACE.OLEDB.12.0.

This works fine on my local development (32 bit) server but when I release it into production (presuming it 64 bit by my initial research), I get the error:

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

Now, I have read that you should target the project specifically to a 32bit but cannot find where you do that using Visual Studio 2008 on projects that use C#.

Any ideas how to overcome this issue?

Thanks,

Rit
0
Comment
Question by:rito1
3 Comments
 
LVL 14

Accepted Solution

by:
existenz2 earned 200 total points
ID: 33752248
0
 
LVL 2

Assisted Solution

by:dd12
dd12 earned 300 total points
ID: 33752264
Well the problem is  if you're on a 64-bit machine then by default IIS 7 wont  serve 32-bit apps, which the database engine operates on.Hence, you will need to follow the following procedure : -

1) ensure that the 2007 database engine is installed, this can be downloaded at: http://www.microsoft.com/downloads/details.aspx?FamilyID=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en

2) open IIS7 manager, and open the Application Pools area. On the right sidebar, you will see an option that says "Set application pool defaults". Click it, and a window will pop up with the options.

3) the second field down, which says 'Enable 32-bit applications' is probably set to FALSE by default. Simply click where it says 'false' to change it to 'true'.

4) Restart your app pool (you can do this by hitting RECYCLE instead of STOP then START, which will also work).

If it still doesn't work after this then you may need to change your Visual Studio Configuration to target for x86.
Please find the process below :
Please change target platform before compilation to "x86" instead of "Any CPU"

in Visual Studio 2008, just go to menu ...

Build -> Configuration Manager -> Active Solution Platform: -> New -> Type or select the new platform -> x86 - > OK
0
 
LVL 1

Author Closing Comment

by:rito1
ID: 33752327
Excellent, thanks both for you input. I will take this up with our host.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now