473,698 Members | 2,218 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 1994
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
2681
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
18120
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
1697
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
4275
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
2463
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
4300
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
10864
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
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9026
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
8893
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
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3045
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2001
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.