C# “MSDAORA.1”提供程序未在本地计算机上注册
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19844383/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The 'MSDAORA.1' provider is not registered on the local machine
提问by Eric
I have an application that connects to a DB, extracts info, creates a excel file, and then drops the file/emails X people the file.
我有一个连接到数据库的应用程序,提取信息,创建一个 excel 文件,然后将文件/电子邮件发送给 X 人。
The application was created in Visual Studios using .NET 2.0 Framework (Windows Form App). It was run on a 32 bit server. But it recently was moved to a 64 bit server. It is now returning with the error message " The 'MSDAORA.1' provider is not registered on the local machine."
该应用程序是在 Visual Studios 中使用 .NET 2.0 Framework(Windows 窗体应用程序)创建的。它在 32 位服务器上运行。但它最近被转移到了 64 位服务器。它现在返回错误消息“'MSDAORA.1' 提供程序未在本地计算机上注册。”
I believe that MSDAORA is only supported for 32-bit applications and the Application Pool the app runs under in IIS is not enabled for 32-bit applications.
我相信 MSDAORA 仅支持 32 位应用程序,并且应用程序在 IIS 中运行的应用程序池没有为 32 位应用程序启用。
How would I fix this issue, is there something I can change in IIS? Or is it a code change?
我将如何解决此问题,我可以在 IIS 中更改某些内容吗?或者是代码更改?
采纳答案by Eric
I figured out the solutions for this. The problem stemmed from running the machine on a 64bit machine. To change that in VS, open up the properties page of the solution and in the build tab change the targeted platform to x86. And that did the trick.
我想出了解决方案。问题源于在 64 位机器上运行机器。要在 VS 中更改它,请打开解决方案的属性页面,然后在构建选项卡中将目标平台更改为 x86。这就是诀窍。
Thanks for your help Yuriy.
感谢您的帮助尤里。
回答by Alex
回答by Philipp M
I had the same issue, but I used another solution because my application is running in IIS.
我遇到了同样的问题,但我使用了另一种解决方案,因为我的应用程序在 IIS 中运行。
In the advanced settingsof the application pool I changed the value for Enable 32-Bit Applications
to true.
在高级设置中的应用程序池为我改变的价值Enable 32-Bit Applications
,以真实的。
回答by Piper
I had he same issue but it wasn't 32/64bit. I used the ODAC xcopy installer and forgot to run it in a cmd.exe as administrator. It didn't give any error so I had a hard time figuring this out. The xcopy part worked but the DLL registration via regsvr32 silently failed.
我有他同样的问题,但不是 32/64 位。我使用了 ODAC xcopy 安装程序,但忘记以管理员身份在 cmd.exe 中运行它。它没有给出任何错误,所以我很难弄清楚这一点。xcopy 部分有效,但通过 regsvr32 进行的 DLL 注册无声无息地失败了。
回答by more urgent jest
11/08/2018
11/08/2018
This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, use Oracle's OLE DB provider.
此功能将在 Windows 的未来版本中删除。避免在新的开发工作中使用此功能,并计划修改当前使用此功能的应用程序。而是使用 Oracle 的 OLE DB 提供程序。
so probably using ORAOLEDB.ORACLE is the correct solution, but that seems like more effort than just changing the connection string.
所以可能使用 ORAOLEDB.ORACLE 是正确的解决方案,但这似乎比仅仅更改连接字符串更费力。