We help IT Professionals succeed at work.

getting computer name in web application

379 Views
Last Modified: 2013-11-26
hello experts,
I created a website form , when users type http://support in IE address bar, that form must be visible for them, I want to get computer name of users when they click submit button.
my os is win xp,
IDE: .net and asp.net and vb.net
thanks
Comment
Watch Question

Dirk HaestProject manager
CERTIFIED EXPERT

Commented:
Perhaps this article can help you further
How To Obtain The Name Of The Client From The ASP Server
http://blogs.msdn.com/ericlippert/archive/2005/05/09/415763.aspx
I use this in ASP, may be it can help you.
      Function MyMachineName()
            on error resume next
            Set WshNetwork = server.CreateObject("WScript.Network")
            IntMachinName=WshNetwork.ComputerName
            Set WshNetwork = Nothing
            MyMachineName = IntMachinName
      End Function

Author

Commented:
hello asvforce
your code return client computer name for me in .net?
<%
Dim ClientMachineName
ClientMachineName = Request.ServerVariables("REMOTE_HOST")
%>
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Try using -

clientMachineName = Request.UserHostName
clientMachineIP = Request.UserHostAddress
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.