473,385 Members | 1,901 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.

GetHostByName on Win98 with DNS disabled

Hi,

I have problem to connect to database server from a windows 98 machine.

I look at exception trace log, the problem seems not because of database
driver itself.

Seems the problem is because of System.Net.Dns.GetHostByName(String
hostName)

I notice in this windows 98 machine, for the TCP/IP protocol, the DNS and
WINS is disabled.

Is this the cause of the problem and how to solve it.

This machine runs in a simple local network. Db server is nothing special,
just a neighbor of this win98 machine. I can ping or even telnet to the
database server using either IP address or server host name. There is no
domain controller or DNS server in this network.

The exception is:

Error to open dbconnection.
MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the
specified MySQL hosts ---> System.Net.Sockets.SocketException: Unknown error
(0x2af9)
at System.Net.Dns.GetHostByName(String hostName)
at MySql.Data.Common.StreamCreator.GetStream(Int32 timeOut)
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledCo nnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnecti on()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at
MySql.Data.MySqlClient.MySqlPoolManager.GetConnect ion(MySqlConnectionString
settings)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at PowerCati.Db.Code.ConnectionAndPoolManager.GetGere ricConnection()

How can I solve this problem? If needed, how can I set DNS in LAN? But
indeed, the windows 98 machine can parse db server host name correctly to IP
address when I use Ping command.

Thanks a lot!
Ryan
May 5 '06 #1
0 1392

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: yawnmoth | last post by:
using the gethostbyname function seems to noticeably slow down pages. some of the comments in php.net's gethostbyname entry suggest using a version that caches the result, but those versions also...
0
by: Eric Brunel | last post by:
Hi all, I just compiled Python 2.3.2 on Linux Mandrake 8.0, upgrading from Python 2.1. I have one problem that I can't figure out: when I wanted to get "the" IP address of the current host with...
1
by: Fortepianissimo | last post by:
I've tried using socket.setdefaulttimeout(timeout) to set the default timeout to 'timeout' for all sockets. The part that's not clear to me, is that if this will affect...
5
by: ruroma | last post by:
Hello, I have one problem, and can think of two possible solutions but I can't manage to make them work. I'm open to other suggestions if you thik is better. The main function calls...
1
by: Glen Conway | last post by:
Hi, I'm trying to use the gethostbyname function from wsock32.dll and failing dismally Has anyone got a successful implementation of this in VB.NET? My ulitimate goal is to resolve NetBIOS names...
1
by: Quentin Carbonneaux | last post by:
Hello, I'm writing a little program which has to get a FQDN on his stdin and return the IP on stdout, we can do it easily with gethostbyname call but I would like to set up a timeout to this...
1
by: yawnmoth | last post by:
I seem to be getting conflicting gethostbyname behavior on different servers. Before going into detail, here's the script I'm using: <? $address = $HTTP_SERVER_VARS; $rev =...
2
by: Andrew DeFaria | last post by:
I've been having problems with my ISP. One way it seems to manifest itself is that I can not reach or contact my ISP's DNS servers. IOW a simply nslookup google.com will fail. So I tried writing...
18
by: aj | last post by:
I have the following snippet of code. On some platforms, the delete calls works, on Linux, it core dumps (memory dump) at the delete call. Am I responsible for deleting the memory that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.