Question

I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007).

I just wonder:
Can I somehow retrieve the name of the PC the Client is using?
I would have access to Active Directory if that helps.
Thing is, people use multiple PCs, so I cannot use any manual/static mapping.

If possible, I do not want to use any client-side (read: JavaScript) code, but if it cannot be done server-side, JavaScript would be OK as well.
(ActiveX is absolutely out of question)

Was it helpful?

Solution

No, that just returns the IP :-(

But I just found it:

System.Net.Dns.GetHostEntry(Page.Request.UserHostAddress).HostName

That only works if there is actually a DNS Server to resolve the name, which is the case for my network.

OTHER TIPS

Does System.Web.HttpRequest.UserHostname provide what you're looking for?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top