Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2011-10-25
1
Medium Priority
?
711 Views
Last Modified: 2012-11-22
I am working on my local machine. I setup a web application in vs 2010 and read an excel spreadsheet via oledb like so:

 var sConnectionString = "Provider =Microsoft.ACE.OLEDB.12.0;" +
"Data Source=" + HttpContext.Current.Server.MapPath("Return Addresses.xlsx") + ";" +
"Extended Properties =\"Excel 12.0 Xml;HDR=YES;\"";

        // Create connection object by using the preceding connection string.
        var objConn = new OleDbConnection(sConnectionString);

        // Open connection with the database.
        objConn.Open();

It worked flawlessly. I setup a website (not application) in vs2010 running on localhost. I run the exact same code and get the following error when i run objConn.Open();:

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

Im using the same machine, I have office 2010 32-bit version installed (my machine is a 64-bit). I have downloaded and ran AccessDatabaseEngine.exe downloaded from this site http://www.microsoft.com/download/en/confirmation.aspx?displayLang=en&id=23734, but that didnt work either. Why can I  read an excel spreadsheet via oledb when I create a web application, but cant read it when I create a website?

0
Comment
Question by:troycomp
1 Comment
 
LVL 17

Accepted Solution

by:
Carlos Villegas earned 2000 total points
ID: 37028856
Hello, you can try these two options:
1. Try installing the 64bit version of Microsoft Access Database Engine components, here the link (is different from yours):
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=13255

2. If you are running your web site on your local IIS, probably your application pool where your aspnet application is running don't has enabled the option to allow 32bit applications, you can set that in your application pool advanced settings (IIS7), enabling it will allow to use the 32bit Microsoft.ACE.OLEDB.12.0 provider:
Application Pool Advanced Settings - IIS7
I recommend you to try the option 1 first.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

564 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