473,385 Members | 1,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

When Connecting To A Remote Oracle DataBase: Socket Exception: No connection could be

Hi All!

I'm trying to connect to a remote oracle database using the OracleConnection within VB.net . Whenever I try connecting I get a SocketException:No connection could be made because the target machine actively refused it. error.

Currently my connectionstring is as follows:

OracleConnection1.ConnectionString = "Provider=OraOLEDB.Oracle;SERVER=(DESCRIPTION=(ADD RESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=myPort))(CON NECT_DATA=(SERVICE_NAME=" & dbName & ")));uid=" & userName & ";pwd=" & password & ";"

Note: The myHost and myPort were taken from the tnsNames.ora file on the machine hosting the database. The dbName, userName and password are provided programatically and inserted to the above string. I know the port must be open on the server because other remote processes can access it, mine just can't.

I can't for the life of me figure out what I'm doing wrong. Any help you could provide would be greatly appreciated.

Thanks!
Oct 25 '07 #1
7 1963
Plater
7,872 Expert 4TB
"the target machine actively refused it." error means you tried to connect to the server at the specified port, but the server says there's nobody listening at that port.
(It's possible that the fire blocked it, but it should give different message)

Are you sure your oracle is setup to receive outside connections (and not just connections from the same machine it's on)?
Do you have access to the connection strings used by those other processes?

Is it on a domain? Do you have domain privledges enough to access the resource?
Oct 25 '07 #2
Thanks for the quick reply!

Yes, I'm sure that it's set up to receive outside connections because there are other webservices which already connect to the same database. No, unfortunately I don't have access to these other webservices (that would make my job WAY too easy, don't you think?). And yes, I should have domain access. That's why I've been pulling out my hair with this all week!
Oct 25 '07 #3
Plater
7,872 Expert 4TB
If you use the connection wizzard in the designer, are you able to make a successfull connection to the oracle server?
Oct 25 '07 #4
No, it's a pretty complicated situation. The way things work, the development system doesn't have access to the database (which makes it hard to develop, trust me), but the client systems where the webservice is called, do have appropriate access. So, it's not just a matter of using the wizard because I know that connection will be denied.
Oct 26 '07 #5
Plater
7,872 Expert 4TB
The webservice is hosted a computer with permision to oracle though?
Oct 26 '07 #6
Yep, that's my understanding. There are other processes which access the database from these PC's, but their code is being guarded like a national secret, so I'm on my own to figure it out.

The service is actually hosted on the same computer as the database, and other clients then call this webservice which is supposed to be able to access the database.
Oct 26 '07 #7
Plater
7,872 Expert 4TB
since you can't use it on the development pc, have you tried referencing localhost (or 127.0.0.1) in your connection string instead of the computer name?
Oct 26 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: christian_stengel | last post by:
Hi *, I have just started to learn python and I am having a problem with an python client connecting to a perl server using ssl (I tried this with pyOpenSSL and with the build in SSL Module). ...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
0
by: Johann Blake | last post by:
I am using the TcpClient to connect to a web site. I then open a NetworkStream and read the contents that are being sent back. The problem is that I have no idea when the remote host is finished...
22
by: M K | last post by:
Heres my SP: ( i am trying to add more than 1 field but get the same error no matter how many i try to add, i thought i would try to insert the primary key only and work up from there but the...
3
by: Steve Teeples | last post by:
I am writing my first database application. I am unable to even get to first base because I can't seem to access the data in the database. Each time the "Fill" command is executed I get an...
9
by: darthghandi | last post by:
I am trying to create a server application using asynchronous sockets. I run into a problem when I try to connect to my server using a non-.net program. I can establish the connection, and send...
7
by: GD | last post by:
Hi, I am trying to call a webservice from a windows service application. It works only if I launch the windows service app from VS.Net 2005 (Worked around from Main()) or from a winform test...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: mina | last post by:
My application which is written in vb.net 2005 uses sql server 2005 express as a database, this application is multi-user. So i am used 3 xp machine to install my application i can say...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.