codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Computer Name in Web page  endlessluv at 14:00 on Monday, September 12, 2005
 

Hi there

Im a uni student, is there a way to get the computer name in a web page. Im developing a computer fault form. So when the user clicks the particular link it has to get that local machine's name and email to the administrator. Its my uni project. I would really appreciate if someone could help me!


  Re: Computer Name in Web page  Yusairi at 03:10 on Thursday, September 22, 2005
 

some info for your knowledge :-
http://blogs.msdn.com/ericlippert/archive/2005/05/09/415763.aspx
Yusairi: site expert
http://www.codetoad.com


  Re: Computer Name in Web page  Yusairi at 03:13 on Thursday, September 22, 2005
 

if you're using ASP.Net maybe you can try code below :-

Dim host As System.Net.IPHostEntry
host = System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST"))
strComputerName = host.HostName
Yusairi: site expert
http://www.codetoad.com


  Re: Computer Name in Web page  asdfgh at 19:20 on Wednesday, April 04, 2007
 

users computer name = System.Net.Dns.GetHostName
I'm 14 and I knew that. Wow

  Re: Computer Name in Web page  Minnow at 13:35 on Tuesday, May 29, 2007
 

You will find that if you put that code into your development box and run it, it will work. BUT...(big BUT)...run that from a separate web server and hit it using any box you will find that you get the same value - the name of the web server. Yes, you will get a computer name, but you are getting the name of the host - the server. In development, you are the server - so you are getting the computer name you expect. In production - it will be different.

You are 14 and so much farther along than most of us at that age, but make sure you not only do things on your own computer, but put them in an environment that is going to emulate a production environment. Things ALWAYS work a little differently in those situations - hang in there!








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• C++
• Re: refresh parent after closing pop up window
• Dynamic Insertion
• Date and Time function around the world???
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009