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

五迷三道 提交于 2019-12-10 09:07:46

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/18502434/solve-microsoft-ace-oledb-12-0-provider-issue-without-installing-microsoft-ac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!