Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …

821 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