Solved

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

Posted on 2010-09-24
3
1,382 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

11 Experts available now in Live!

Get 1:1 Help Now