[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1450
  • Last Modified:

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

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
rito1
Asked:
rito1
2 Solutions
 
existenz2Commented:
0
 
dd12Commented:
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
 
rito1Author Commented:
Excellent, thanks both for you input. I will take this up with our host.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now