oracle IIS下通过ASP.NET页面连接Oracle数据库的问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/881717/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 18:15:45  来源:igfitidea点击:

Problem connecting to Oracle database via ASP.NET page under IIS

asp.netoracle

提问by Calanus

I'm having a problem getting a simple ASP.NET webpage to display. The page contains a GridView with a SqlDataSource connected to an Oracle database.

我在显示一个简单的 ASP.NET 网页时遇到了问题。该页面包含一个带有 SqlDataSource 的 GridView 连接到 Oracle 数据库。

When I run the page in the VS debugger (cassini webserver) everything works fine, but when I publish the application to my local IIS server (same machine), I get the following error:

当我在 VS 调试器(cassini webserver)中运行页面时,一切正常,但是当我将应用程序发布到本地 IIS 服务器(同一台机器)时,出现以下错误:

ORA-12154: TNS:could not resolve the connect identifier specified

ORA-12154: TNS: 无法解析指定的连接标识符

If it was a different machine I could understand that it might be a tnsnames.ora or other problem that I could investigate via tnsping. I have also set the security on the folder containing the Oracle drivers to "Everybody", and set the webapp to run under a "Priviliged" AppPool (Identity as Administrator), but with no success.

如果它是另一台机器,我可以理解它可能是 tnsnames.ora 或其他问题,我可以通过 tnsping 进行调查。我还将包含 Oracle 驱动程序的文件夹的安全性设置为“Everybody”,并将 webapp 设置为在“Priviliged”AppPool(管理员身份)下运行,但没有成功。

Anyone else got any ideas??

其他人有什么想法吗??

回答by Konstantinos

thisguide is a bible for this kinds of problems :)

指南是解决此类问题的圣经 :)

Actually i have printed one copy of this guide and distribute it to every consultant involved with IIS ASP.NET to ORACLE connectivity issues. The checklist will probably get your problem solved, unless you have a problem within your code which you don't seem to have based on your scenario.

实际上,我已经打印了本指南的一份副本,并将其分发给所有涉及 IIS ASP.NET 到 ORACLE 连接问题的顾问。检查清单可能会解决您的问题,除非您的代码中存在根据您的场景似乎没有的问题。

回答by tuinstoel

I think you more than 1 Oracle client. You need to search ALLyour tnsnames.ora files with the windows explorer and compare and synchronize ALLthose files.

我想你1个以上的Oracle客户端。您需要使用 Windows 资源管理器搜索所有tnsnames.ora 文件并比较和同步所有这些文件。

回答by abmv

maybe you need to specify the IP

也许你需要指定IP