How to retrieve Windows PC name of user

How to retrieve Windows PC name of user

  
Hi All,

Is it in anyway possible to find the local windows computer name of the user accessing the website ?
We want to use it as a way to identifiy on which machine (PC) someone is working.

I';ve seen functions like this  http://msdn.microsoft.com/en-us/library/ms724295(VS.85).aspx  and this http://stackoverflow.com/questions/2459492/get-computer-name-in-c-sharp-without-referencing-microsoft-visualbasic-dll but don't know how to use it ...

Joop
Hi Joop,

Both those you mention would give the name of your Server Machine, not the user.

Think the best you could try is something like http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostname%28v=vs.90%29.aspx or http://msdn.microsoft.com/en-us/library/system.web.httprequest.userhostaddress%28v=vs.90%29.aspx inside an extension. Those will probably not work at all if there are non-transparent proxies in the middle.

Also carefull with all the javascript based solutions you see around the web ...getting that information is not allowed by js security policies.

Regards,
João Rosado
Hi Joop,

I think you can access that kind of information using a small Silverlight application  to query it in the client side.
One of the API's that you can explore is System.Net.Dns..
Hope it helps..
If you have any news, share it with us..


Best Regards,
Gonçalo Martins
@João
I don't need the IPAddress or the HostName ...
I want to have the PC (Device) name the user is working on ...

@Gonçalo
I don't want to install a SilverLight app 
Would be nice to have an extension
Forget this, it will never work ... 

I've been looking around and all I can find is an ActiveX solution. And we don't want to stuck to IE as default browser.
So no options....

We'll have to reconsider the options and the possible solution !!

Thanks guys !
Joop Stringer wrote:
Forget this, it will never work ... 

I've been looking around and all I can find is an ActiveX solution. And we don't want to stuck to IE as default browser.
So no options....

We'll have to reconsider the options and the possible solution !!

Thanks guys !
 
 I would say that you should look into using an extension that uses WMI (but it will only work for Ms Windows).
This is a powerfull set of functions that you can use to query all kinds of data from the client PC.

Edit: adding a link would be useful
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394582%28v=vs.85%29.aspx