Solved

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

Posted on 2009-07-14
5
872 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now