Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

getting computer name in web application

Posted on 2007-10-10
6
Medium Priority
?
362 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
0
Comment
Question by:farhadtolooie
6 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 20048201
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
0
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20048212
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
0
 

Author Comment

by:farhadtolooie
ID: 20054998
hello asvforce
your code return client computer name for me in .net?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20055552
<%
Dim ClientMachineName
ClientMachineName = Request.ServerVariables("REMOTE_HOST")
%>
0
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 1000 total points
ID: 20055718
The code above gives you just IP of client's machine. But before you go ahead read the below and check the link given.
Thanks to Dhaest: for the detailing link.

If you want this to actually give you the name of the remote machine then there's some additional work you have to do. Since we have the IP address then we can do a reverse DNS lookup to see if there is a friendly name associated with that address. Now the server is trusting not an arbitrarty client but rather a specific reverse DNS server.

Read this Knowledge Base article on how to configure your server to automatically do Reverse DNS lookups when the code above is called.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q245574

Note that this will make your server performance worse, and of course is not guaranteed to work if the client machine is disguising its identity via a firewall, etc.

0
 
LVL 2

Expert Comment

by:dhwanilshah
ID: 20057352
Try using -

clientMachineName = Request.UserHostName
clientMachineIP = Request.UserHostAddress
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question