Last post Feb 06, 2015 08:01 AM by PatriceSc
Feb 04, 2015 12:32 AM|KMR4|LINK
My Understanding about Request.UserHostName
Feb 04, 2015 03:54 AM|AidyF|LINK
It just looks at the REMOTE_ADDR server variable, here's the code
public override string GetRemoteAddress()
Feb 04, 2015 09:08 PM|KMR4|LINK
You mean that Request.UserHostName just use environment valuable.
HTTP Request Class seems same to your sample.
Feb 06, 2015 08:01 AM|PatriceSc|LINK
As far as I know it doesn't do a name resolution but just take the best information available out of the incoming network frame. So you could perfectly have an IP addresss rather than a name. If you are REALLY interested in the name you could configure IIS
to do the name resolution (with the corresponding performance penalty) or maybe do that by your app or later. Make sure the name is really usefull (not convinced).
Also you could perhaps see http://referencesource.microsoft.com/ to see what happens exactly under the hood at least up to some level...