473,497 Members | 2,051 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

api for hosts / lmhosts

Does Windows API or .NET API offer any methods related to querying the
mappings present in HOSTS or LMHOSTS file ?
Aug 15 '08 #1
1 1657
On Aug 15, 3:58*am, "John A Grandy" <johnagrandy-at-gmail-dot-com>
wrote:
Does Windows API or .NET API offer any methods related to querying the
mappings present in HOSTS or LMHOSTS file ?
You shouldn't ever need to. Any time you do something that results in
a DNS name resolution (such as WebRequest.Create() with a domain
name), the OS itself will consult the hosts file, and similarly, every
time there is a NetBIOS name resolution (such as File.Open() with an
UNC path), the OS will consult lmhosts.
Aug 15 '08 #2

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

Similar topics

0
1825
by: Liza | last post by:
Hi, I run Tomcat5.0.24 on Fedora Core 1. I have two hosts defined in server.xml in a following way: <Host name ="WebTest1.something.com" debug="0" appBase="webapps" unpackWARs="true"...
0
3516
by: Bla | last post by:
Hello, Does anyone have a script that would remove the appropriate line from the hosts file on a UNIX box. This might be a tricky one? Let's say we have a list of hosts and associated ip's we...
0
1314
by: shawnk | last post by:
I want to use the Hosts file to locate schema for validation. The Hosts file (C:\Windows\System32\etc) will locate xsd schema files on a LAN server for development purposes. This gives me a...
0
2979
by: David Swanson | last post by:
I am trying to configure the proxy section of the machine.config to handle BOTH connecting to hosts that are not "live" but rather defined in my winnt/system32/drivers/etc/hosts file. AND to hosts...
1
5039
by: Fakhar S via DotNetMonster.com | last post by:
Hello, I need an urgent help here. I would like to write a code where I can bypass the hosts file entries while contacting the web server directly. I also want to get the list of IP addresses...
7
2998
by: Bob | last post by:
I'm using PHP 5.1.1 with Apache 2.0.54 and several virtual hosts. PHP is installed as a module. I've created a very simple test page containing <?php phpinfo(); ?> and placed it at the doc root...
4
4446
by: Haxan | last post by:
Hi, I am looking for a way to write etc/hosts file. Is there any APIS for search/delete/insert/update for entries ? or behave hosts as a normal file ? thanks in advance
4
1481
by: DanWeaver | last post by:
I am dumbfounded at the apparent lack of an obvious mechanism that prevents finding a shared host being the absolute nightmare it is: due to the nature of the business (ie techies who know about...
5
2867
by: mike.coakley | last post by:
Does stream_socket_client use the /etc/hosts file? I'm using Mac OSX 10.5.3 as a development platform and VMware Fusion for VM hosting. I have a OpenSUSE Linux VM that has an Apache 2 web server...
0
7121
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,...
0
7197
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...
1
6881
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...
0
7375
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...
1
4899
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...
0
4584
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...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
287
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...

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.