Retrieving the PC Name of a Client? (Windows Auth)

Question :

Retrieving the PC Name of a Client? (Windows Auth),

Answer :

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. The 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.

Read More  How do I generate a hashcode from a byte array in C#?

,

as suggested in  just returns the IP 🙁

But I just found this:

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.

That’s the answer Retrieving the PC Name of a Client? (Windows Auth), Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you

Read More  Mod-Rewrite loading files behind the DocumentRoot