Learn when you want, where you want with convenient online training courses. Sign up now!
"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.
WatchGuard is proud to announce the launch of AuthPoint, a powerful, yet simple, Cloud-based MFA service designed to eliminate the vulnerabilities that put your data, systems, and users at risk.
using (var client = new WebServiceClient(42, "license_key"))
// Do the lookup
var response = client.Country("18.104.22.168");
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.