简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM