Some issue about "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."

StackOverflow https://stackoverflow.com/questions/21748431

Вопрос

I get the issue

Some issue about "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine..

I've already installed Microsoft Access Database Engine 2010 Redistributable and 2007 one on the server machine which has iis and SQL server. When I am debugging in VS on the server, there is no error and it works well; although when I am trying to import excel other PC's via internet with HTTP protocol it returns error, if I try it on the server via http web page it returns "The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine." this error.

I can only use it just debugging and already have access database engine, how can I fix it?

Here is my connectionstrings in web config

<add name ="Excel03ConString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR={1}'"/>
<add name ="Excel07ConString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0;HDR={1}'"/>

ps:I've got the error both oledb.4.0 and oledb.12.0

Это было полезно?

Решение

On IIS7 and higher I believe you can enable 32-bit on the application pool.

Open inetmgr and go to application pools. For the application pool that your web site is using, click "Advanced settings" in the pane to the right.

Find the setting "Enable 32 Bit Applications" and change the value to "True".

Instead of changing the default ASP.NET application pool, you should create your own application pool for your web site.

enter image description here

Другие советы

You need to change your working platform from Configuration Manager.

Link:How to change working platform (x86/x64) (You can check the answer of Steve)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top