Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 23rd, 2004, 01:33 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Identify the computer Name

hi Guys!!! Back with Same Sort Of Problem..

I used "Request.ServerVariables("REMOTE_HOST")" but i am not getting the host name..
i am getting the local loop address 127.0.0.1

Even For request.ServerVariables("REMOTE_ADDR")I am Getting The same Answer 127.0.0.1 and not my IP Address..

I used ipconfig And I am Gettying The IP which i am not getting using Requesr.ServerVariables("REMOTE_ADDR")


 So guys I need the solution for this Immediately..
plz help me..
-------------------Merry Cristmas------------------------------
              And Happy New Year----------------------
-Bye for Now


MuthuKumar.AL
__________________
MuthuKumar.AL
 
Old December 24th, 2004, 03:15 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Are you targeting IE and Netscape?
If IE alone .. you can make use of Windows Script Host and File System Object to achieve this.

chk out http://www.experts-exchange.com/Web/Q_11013581.html .. replace physical address with Host Name ... that sample would work.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
 
Old December 30th, 2004, 02:15 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi vadivel ! sorry for this late response and thanx ..
  but really i could'nt understand the code. a doubt as i said i am zero in hardware i need to know whether due to proxy settings the Request.ServerVariables("REMOTE_HOST") not giving me right answer or is some other fault.

 as i am working under proxy settings...

 so plz help me to solve the problem...

   i need helping hands...


MuthuKumar.AL
 
Old December 31st, 2004, 06:30 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How do you browse to your application? Using http://localhost? The it will always return 127.0.0.1 as localhost *is* 127.0.0.1

Try your fully qualified machine name (depends on your ISP and network), or try browsing with the IP address directly.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Cinderella's big score by Sonic Youth (Track 4 from the album: Dirty boots) What's This?
 
Old January 3rd, 2005, 05:53 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx.,
 i understand why this happens but i do not know how to browse directly via ipaddress.

so imar plz guide and help me so that i can proceed further..
bye for now.

MuthuKumar.AL
 
Old January 3rd, 2005, 06:00 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Open a Command Prompt and type ipconfig

You should see your IP address....


Imar
 
Old January 3rd, 2005, 07:48 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi imar,
 i know how to look for my IPAddress but do not know how to browse through ipaddress.
i usually run the explorer using http://localhost
so plz give me the solution to browse through ipaddress.
 thanx and bye for now



MuthuKumar.AL
 
Old January 3rd, 2005, 08:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How about http://YourIPAddress ??

Imar
 
Old January 4th, 2005, 05:15 AM
Authorized User
 
Join Date: Dec 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Imar! thanx for your solution. My IP Address -i am not getting the host name even though i browse using ipaddress. my hostname returns the ipaddress.
give me a solution for this.
thanx and bye for now


MuthuKumar.AL
 
Old January 4th, 2005, 05:11 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Ah, I see now. Vadivel was right. By default, Remote_Host returns the client IP address, not the machine's name.

In an Intranet scenario you can do a reverse DNS lookup to get the name of the machine instead of the IP address.

See here for more details: http://support.microsoft.com/kb/q245574/

Just curious: why do you need the name and not just the address??

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Bury Me by Hed Planet Earth (Track 3 from the album: Blackout ) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
identify increase automatic phuc2583 Classic ASP Basics 4 January 10th, 2008 08:00 PM
can we identify the text in the XSLT? rajatake XSLT 7 March 22nd, 2007 08:28 AM
How to know/identify that installation is done shiby_chacko1@rediffmail. C# 1 March 30th, 2005 03:21 AM
How to identify the computer Name MuthuAL Classic ASP Databases 2 December 22nd, 2004 08:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.