G
Guest
I have a class for logging information about user activity on a web site, but
it suddenly became really slow. I was wondering what factors may have
caused the slow down.
Initially, I used the following code:
ul.HostName = context.Request.UserHostName;
Since the UserHostName is not always resolved, I opted for the following
more effective code:
IPAddress hostIPAddress = IPAddress.Parse(context.Request.UserHostAddress);
IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);
ul.HostName = hostInfo.HostName;
hostInfo = null;
hostIPAddress = null;
This worked fine for months, but now it is seriously dragging down
performance. Is there something my web host could do to fix this problem?
Thanks.
it suddenly became really slow. I was wondering what factors may have
caused the slow down.
Initially, I used the following code:
ul.HostName = context.Request.UserHostName;
Since the UserHostName is not always resolved, I opted for the following
more effective code:
IPAddress hostIPAddress = IPAddress.Parse(context.Request.UserHostAddress);
IPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);
ul.HostName = hostInfo.HostName;
hostInfo = null;
hostIPAddress = null;
This worked fine for months, but now it is seriously dragging down
performance. Is there something my web host could do to fix this problem?
Thanks.