连接到Oracle致力于通过一个控制台应用程序,并通过Web服务无法正常工作 [英] Connection to Oracle works through a console application and doesn't work through a web service

查看:262
本文介绍了连接到Oracle致力于通过一个控制台应用程序,并通过Web服务无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法通过ASMX Web服务,通​​过一个控制台应用程序[86]连接到Oracle模式,而不是我所能。

I can't connect to an Oracle schema through a asmx web service instead of I can through a console application [x86].

在code:

var conn = new OracleConnection("Data Source=xe;User ID=mySchema;Password=myPass");

例外情况:

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

环境:Windows 7的64 - 2008 VS

The environment: Windows 7 x64 - VS 2008.

你知道吗?

亲切地问我任何额外的信息。

kindly ask me for any extra information

在此先感谢。

推荐答案

OCI,在其ODP(或本机Oracle客户端层)是基于Oracle客户端层具有prevents位于一个文件夹中的任何应用程序中的错误包含括号()的正常运行。

OCI, the Oracle client layer on which ODP (or the native Oracle client layer) is based has a bug that prevents any application located in a folder containing parentheses () from running properly

这个错误是因为程序文件(x86)文件夹的幽灵......

This bug is very visible since the apparition of the Program Files (x86) folder...

在运行应用程序的主机(通常是IIS)可能是位于x86文件夹,因此这个问题。您的控制台应用程序工作正常,因为它可能位于一个没有问题的一个文件夹中。

The host running your application (typically IIS) is probably located in the x86 folder, hence the issue. Your console app works fine because it's probably located in a folder that does not have the issue.

更多信息以及一些解决方案<一href="http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/01/26/connectivity-issue-with-oracle-in-x64-environment-ora-12154-tns-could-not-resolve-the-connect-identifier-specified.aspx"相对=nofollow>这里。

More info and a few solutions here.

这篇关于连接到Oracle致力于通过一个控制台应用程序,并通过Web服务无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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