[英]How to connect oracle database remotely from a ASP.Net application
我有两台电脑。 在一台PC(PC1)中,我安装了Oracle Express Edition 10g(据我所知为10.2.0.0)。 在另一台(PC2)中,我安装了Visual Studio 2008 sp1。 在PC2中,ASP.Net应用程序正在运行。 但是我无法将Oracle数据库连接到PC1。 PC1和PC2通过LAN连接(TCP / IP {实际上,它们是通过有线连接并具有两个IP}),但是当ASP.net应用程序和数据库都在相同的PC中时,它运行良好。 有人可以帮忙吗?
NHibernate配置文件是:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
<property name="connection.connection_string">Data Source=xe;Persist Security Info=True;User ID=hr;Password=hr;Unicode=True</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.Oracle9Dialect</property>
<!-- mapping files -->
<mapping assembly="DataTransfer" />
</session-factory>
</hibernate-configuration>
我要检查的第一件事是安装Oracle客户端(或瘦客户端),对其进行配置,然后尝试通过SQLPlus连接到远程数据库。 这将花费很多精力,并确保您使用Oracle驱动程序与数据库具有基本连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.