I have below code in global.asax. I am getting remote_addr details in my local but not after deployment.
log4net.GlobalContext.Properties["username"] = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName.ToString();
To get the Host Name, you need to turn the reverse dns lookup on. It is a behavioral change in IIS. system.webServer/security/ipSecurity@doReverseDns and get the REMOTE_HOST server variable.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.