473,725 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

4 New Member
Hi All!

I'm trying to connect to a remote oracle database using the OracleConnectio n 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 connectionstrin g is as follows:

OracleConnectio n1.ConnectionSt ring = "Provider=OraOL EDB.Oracle;SERV ER=(DESCRIPTION =(ADDRESS=(PROT OCOL=TCP)(HOST= myHost)(PORT=my Port))(CONNECT_ DATA=(SERVICE_N AME=" & 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 1999
Plater
7,872 Recognized Expert Expert
"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
cyberbilly1
4 New Member
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 Recognized Expert Expert
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
cyberbilly1
4 New Member
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 Recognized Expert Expert
The webservice is hosted a computer with permision to oracle though?
Oct 26 '07 #6
cyberbilly1
4 New Member
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 Recognized Expert Expert
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
2685
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). I don't want to check a cerificate, so i simply tried a from OpenSSL import SSL
4
18130
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 as I find appropriate. I am using the socket asynchronously by calling the BeingSend and BeginReceive calls. I would like to be able to call shutdown and close asynchronously if possible.
0
1700
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 sending data. It is sending a web page but it doesn't use the Content-Length header to indicate the size. While I can use the DataAvailable property, it is well known that you cannot rely on this to know when no more data is available. What I...
22
4282
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 primary key insert didnt work either. I can run the SP manually in Visual Studio .NET and it works. When i try to do this it doesn't. Any help is greatly appreciated... newbie here as well so please be gentle :) ALTER PROCEDURE dbo.AddJob
3
2466
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 exception . Does anyone know why this may be? The database has only two small tables and I am just trying to access the first table. I have already enabled Remote connections on my system. private void GetData() { // Specify a connection string.
9
4303
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 some packets in response to the programs first message, but when I receive a response back, it's the last packet I sent. After that packet, I receive the packet I really wanted. This only happens when I connect with local host. I tried...
7
10865
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 application. However, it generates a kind of security error after I install and start the service in my Window Server machine. I believe that it is related to authentication. The following is the sample code: HttpWebRequest obj =...
0
2005
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 ((string)(this.GetPropertyValue("Address1")));
0
4619
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 machine1,machine2 ,machine3 on which i have install my application. On machine1 i also install SQL Server 2005 express. Then run mu application from machine1 which is locally its work fine. But i am facing problem when i am trying to connect from the...
0
8888
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.