Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solve "Microsoft.ACE.OLEDB.12.0" provider issue without installing "Microsoft Access Database Engine"

I am importing some data from MS-Excel to C#. When I deployed this application on my local server (IIS 7) I got following error.

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

I installed the "Microsoft Access Database Engine" on local server to solve this issue. Now when I deployed my application on remote server. I got same error. Installing "Microsoft Access Database Engine" on live server is not allowed for security reason.

My Question is that is there any way to solve this issue from .dll (adding some reference to the project) or any other way.

like image 773
Amit Mishra Avatar asked Aug 29 '13 04:08

Amit Mishra


1 Answers

I had a similar issue. In my case it was because the target system was a 64 Bit OS and the interop DLLs are only available 32 Bit. I solved the issue changing my Build Configuration from "Any CPU" to 32 Bit.

Hope it helps in your case too.

like image 84
Dannydust Avatar answered Oct 01 '22 22:10

Dannydust