开发者

How to connect oracle database remotely from a ASP.Net application

开发者 https://www.devze.com 2022-12-21 21:19 出处:网络
I have two PC. In one pc(PC1) i have installed oracle express edition 10g (10.2.0.0 as far as i know). And in

I have two PC. In one pc(PC1) i have installed oracle express edition 10g (10.2.0.0 as far as i know). And in another(PC2) i have installed visual studio 2008 sp1. In PC2 the ASP.Net application is running. But i can not connect to the oracle database to PC1. PC1 and PC2 are connected by LAN(TCP/IP {Actually they are connected by wire and given two IP} ) But it was working perfectly while both ASP.net application and database were in the samae PC. can any one help?

the NHibernate configuration file is:

<?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.Oracle9Dial开发者_StackOverflow中文版ect</property>
    <!-- mapping files -->
    <mapping assembly="DataTransfer" />
  </session-factory>
</hibernate-configuration>


First thing I would check is to install the Oracle client (or thin client), configure it, and try connecting to your remote database via SQLPlus. This takes lots of pieces out of the picture and makes sure you have basic connectivity to your database with the Oracle driver.

0

精彩评论

暂无评论...
验证码 换一张
取 消