473,569 Members | 2,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

In which way to get the host name?

I need to get the host name of the local PC/Workstation, so I can use the:
Dns.GetHostName () or Environment.Mac hineName

What is the difference between the two? when I read the documentation I
couldn't decide which one to use.
I must say the the PC may not be connected to the Internet/Intranet.

Which one should I use?
Is there any other way to get the local host name which is better then the
above two?

--
Regards
Sharon G.
Nov 16 '05 #1
0 1672

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

Similar topics

9
3327
by: Jeff | last post by:
Is there a way to echo back a case sensitive $HTTP_HOST in PHP? For example if I type HostName.domain.com in my browser I want to return it exactly as it appears in the location part of the browser "HostName.domain.com" but it keeps returning a case insensitive result "hostname.domain.com".
3
3018
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements - also allow them? Adding (and removing) object properties dynamically is an acceptable and common practice in JavaScript, and greatly adds to the...
2
2095
by: Jeff S | last post by:
What are my options if I want to host hundreds of sites on one IIS server (like Internet presence providers do); such that site1.com, site2.com, site3.com... site278.com... are all hosted on the same box? I already know that each site can be specified on a different port, the particular site to be accessed can be specified in the HTTP...
2
2183
by: Jeff | last post by:
I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in the eNPTest02 directory of my localhost on my development machine. The database is on the web. I've found a way that works on the web, and I'm trying to get it to also work in debug mode in the IDE. The "on the web" page and my SQL database...
6
2660
by: Brian Henry | last post by:
is there a way to get the host name of someone? like mine is 68-23-123-123-pitt-pa.adelphia.net? Request.UserHostName doesn't seem to return the host name like it states in the documentation, only gives me back an IP address.. which is what I assumed Request.UserHostAddress would do... they both return the same values all the time
4
3884
by: cpptutor2000 | last post by:
Could some C guru help me please? I am using the following program to open a SSH connection to a remote host and eventually run a program on that remote host. #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv){ char command;
2
5599
by: Frank Swarbrick | last post by:
I'm just learning about embedded SQL, so be gentle... My basic question is, if I use a fixed length host variable for a column defined as VARCHAR, will trailing spaces be removed (or not) upon INSERT or UPDATE of this column? I tried it, and it appears they are *not* stripped. However, the Programming Client Applications manual leads me to...
0
5932
by: =?Utf-8?B?UmljaGFyZCBDb2xsZXR0ZQ==?= | last post by:
My goal is to connect a WSE 3.0 client to a WCF asp.net hosted service, utilizing MTOM encoding and if at all possible, streamedRequest transfer mode. I am starting with a basic Hello World service. I am basing the configuration on these articles: ...
3
29478
by: lilly07 | last post by:
I am using following code to find the hostname/dns name of a linux server. (grep {chomp;} system ('hostname -s')); And the name of the server gets printed as XXX. And I am trying assign this value to $host as below. But it is not working and $host name is null. How do I assign XXX to $host. $host =(grep {chomp;} system ('hostname...
2
995
by: best_hosting | last post by:
Top 10 Things To Look For In A Web Host http://hosting-top10.blogspot.com/2008/07/top-10-things-to-look-for-in-web-host.html 5 Tips To Choose A Domain Name For An Internet Business http://hosting-top10.blogspot.com/2008/07/5-tips-to-choose-domain-name-for.html Domain Name Registration - Investments That Reap Benefits (part 2)...
0
7701
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...
0
8130
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...
1
7677
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...
0
7979
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...
1
5514
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...
0
5219
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...
0
3653
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...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
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

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.