解决"Microsoft.ACE.OLEDB.12.0"提供商问题而未安装"Microsoft Access数据库引擎"; [英] Solve "Microsoft.ACE.OLEDB.12.0" provider issue without installing "Microsoft Access Database Engine"

查看:489
本文介绍了解决"Microsoft.ACE.OLEDB.12.0"提供商问题而未安装"Microsoft Access数据库引擎";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将一些数据从MS-Excel导入C#.当我在本地服务器(IIS 7)上部署此应用程序时,出现以下错误.

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.

"Microsoft.ACE.OLEDB.12.0"提供程序未在本地注册 机器

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

我在本地服务器上安装了"Microsoft Access数据库引擎"以解决此问题.现在,当我在远程服务器上部署我的应用程序时.我有同样的错误. 出于安全原因,不允许在实时服务器上安装"Microsoft Access数据库引擎".

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.

我的问题是,有什么方法可以通过.dll(向项目添加一些引用)或其他任何方法来解决此问题.

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

推荐答案

我遇到了类似的问题. 在我的情况下,这是因为目标系统是64位操作系统,而互操作DLL仅可用32位. 我解决了将构建配置从任何CPU"更改为32位的问题.

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.

这篇关于解决"Microsoft.ACE.OLEDB.12.0"提供商问题而未安装"Microsoft Access数据库引擎";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆