Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional 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 April 22nd, 2010, 11:07 AM
Authorized User
 
Join Date: Aug 2008
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default To retrieve users machine ip

Hello Guys,

I have a requirement where i need to retrieve the users machine name, ideally the windows login id.

I am able to retrieve the users machine ip via
Request.ServerVariables("remote_addr")

but unable to pull the machine name.....

Could anybody help me with this request please???

Thanks,
Vijay
 
Old April 22nd, 2010, 12:04 PM
Authorized User
 
Join Date: Jan 2010
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use following to get machine name from IPAddress:-

(System.Net.Dns.GetHostEntry(Request.UserHostName) ).HostName
 
Old April 23rd, 2010, 10:09 AM
Authorized User
 
Join Date: Aug 2008
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Sorry that piece of code does not work, sadly i have been trying with vbscript to do it.

Any ideas on that?

Please help.

Thanks
Vijay
 
Old April 25th, 2010, 02:27 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

To get server name, use the following:
Request.ServerVariables("SERVER_NAME")

If you want to get actual computer name (from system properties) the ncheck the following link:
http://classicasp.aspfaq.com/general...he-server.html
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old June 18th, 2010, 02:46 AM
Authorized User
 
Join Date: Jun 2010
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by om_prakash View Post
To get server name, use the following:
Request.ServerVariables("SERVER_NAME")

If you want to get actual computer name (from system properties) the ncheck the following link:
http://classicasp.aspfaq.com/general...he-server.html
hi.but how could we write that address while we are on the server.i want to say that i ve got the client address or name, then how could i use this as a client address from server to send somthing to client or to redirect to client based page.
__________________
B + & Think +





Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple PHP question - Obtaining the users IP address ramone_johnny Beginning PHP 6 May 7th, 2009 02:22 PM
Retore Db from a remote machine to a local machine srkvellanki BOOK: Beginning SQL 0 October 3rd, 2008 05:17 PM
IP Address of a local machine Dilip Nagle Classic ASP Basics 1 September 29th, 2005 10:26 PM
How to get IP Address of the User Machine pkdev Classic ASP Basics 2 April 10th, 2004 01:44 PM





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