Solved

How do I get hold of the computername in ASP.NET , VB.NET

Posted on 2009-07-14
5
899 Views
Last Modified: 2012-05-07
Hi  I currently have a form that users fill in I am able to grab their Windows Login Username: by using User.Identity.Name.ToString() but I would like to also grab their Computername ( I have tried using Return Environ("COMPUTERNAME").ToString ) but this returns the server/computer name of where the form is hosting from and not the name of the computer submitting the form? I am able to get the IP address by using Request.ServerVariables("REMOTE_ADDR").ToString.

But any ideas for retrieving the computer name of the person submitting the form? What is the best and simplist way of achieve this please. Thanks in advance.
0
Comment
Question by:adypips
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24850188
Because the ASP.NET code executes on the server, it would retrieve the server name. To retrieve the name of the client computer, you have to use JavaScript or VBScript. These links might be useful

http://bytes.com/groups/javascript/92507-get-computer-name

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_22975803.html#20350353

http://lists.evolt.org/pipermail/javascript/2002-March/003113.html

0
 
LVL 12

Expert Comment

by:wht1986
ID: 24851970
REMOTE_ADDR will usually return the ip address, unless reverse DNS is enabled.  Check this link
http://support.microsoft.com/kb/297795
0
 

Author Comment

by:adypips
ID: 24853016
Hi thanks for the above comments, but they dont help me as I am not a Javascript coder, could you please provide a simple script in vbscript or javascript or asp.net script that will return the client computer name to a textbox for example  - as this would solve my problem, is there are way of doing this?

2nd comment, I can return the IP for the client no problem, really want the client computername, but thanks.

Thanks AdyPips.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
ID: 24857543
Further research suggests that its not possible unless you use some activex or other component. Here is a link to a good source of general scripts though.

http://javascript.internet.com/user-details/
0
 

Author Comment

by:adypips
ID: 24860020
thanks codecruiser I will have a look at these.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 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