Learn when you want, where you want with convenient online training courses. Sign up now!
[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
Were you aware that overall malware worldwide was down a surprising 42% from Q1'18? Every quarter, the WatchGuard Threat Lab releases an Internet Security Report that analyzes the top threat trends impacting companies worldwide. Learn more by viewing our on-demand webinar today!
using (var client = new WebServiceClient(42, "license_key"))
// Do the lookup
var response = client.Country("188.8.131.52");
Console.WriteLine(response.Country.IsoCode); // 'US'
Console.WriteLine(response.Country.Name); // 'United States'
Console.WriteLine(response.Country.Names["zh-CN"]); // '美国'
Open in new window
protected string GetIPAddress()
System.Web.HttpContext context = System.Web.HttpContext.Current;
string ipAddress = context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
string addresses = ipAddress.Split(',');
if (addresses.Length != 0)
Error 13 The type or namespace name 'WebServiceClient' could not be found (are you missing a using directive or an assembly reference?)
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.