Answered by:
Account ID issue

Question
-
User364663285 posted
Dear,
What to adjust (to the codes) below, due to such error?Your account ID or license key could not be authenticated. at MaxMind.GeoIP2.WebServiceClient.HandleResponse[T](Response response) at MaxMind.GeoIP2.WebServiceClient.Execute[T](String type, IPAddress ipAddress) at MaxMind.GeoIP2.WebServic
SqlConnection conn3g = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString); conn3g.Open(); try { String format = @"MM\/dd\/yyyy HH:mm:ss"; //SqlCommand cmd3g = new SqlCommand("insert into err values('777pp" + Convert.ToString(rec_id) +"--"+lb_house_id.Text+"--"+cmd6.CommandText+ "',2,getdate()) ", conn3g); using (var client = new WebServiceClient(42, "license_key")) { // Do the lookup var response = client.Country("128.101.101.101"); Console.WriteLine(response.Country.IsoCode); // 'US' Console.WriteLine(response.Country.Name); // 'United States' Console.WriteLine(response.Country.Names["zh-CN"]); // '美国' } SqlCommand cmd3g = new SqlCommand("insert into err values('99ii" + IPAddress + "',2,getdate()) ", conn3g); cmd3g.ExecuteNonQuery();
Friday, September 21, 2018 10:02 AM
Answers
-
User753101303 posted
Hi,
The message is quite clear. 42 and "license_key" are likely wrong.
If this is sample code, you likely have to subscribe and get your own values. If you changed them to avoid to disclose them, triple check in your original source code that you are using the correct values maybe using links found at https://dev.maxmind.com/geoip/geoip2/web-services/#Authorization
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, September 22, 2018 8:37 AM
All replies
-
User753101303 posted
Hi,
The message is quite clear. 42 and "license_key" are likely wrong.
If this is sample code, you likely have to subscribe and get your own values. If you changed them to avoid to disclose them, triple check in your original source code that you are using the correct values maybe using links found at https://dev.maxmind.com/geoip/geoip2/web-services/#Authorization
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, September 22, 2018 8:37 AM -
User364663285 posted
Thanks. Where to get the correct key?
Saturday, September 22, 2018 8:58 AM -
User753101303 posted
Do you have an account with them? The link I posted earlier gives a quick explanation as well as links to get your account id and license key.
Saturday, September 22, 2018 10:06 AM -
User364663285 posted
Sorry, how to register to get the account below?
https://www.maxmind.com/en/account/login?redirect_to=%2Fen%2Faccount
Saturday, September 22, 2018 11:42 PM -
User61956409 posted
Hi wmec,
Your account ID or license key could not be authenticated. at MaxMind.GeoIP2.WebServiceClient.HandleResponse[T](Response response) at MaxMind.GeoIP2.WebServiceClient.Execute[T](String type, IPAddress ipAddress) at MaxMind.GeoIP2.WebServicAs I mentioned in your another thread, you do not provide valid accountId and licenseKey when you Initialize a new instance of WebServiceClient object, which causes the issue.
how to register to get the account below?
https://www.maxmind.com/en/account/login?redirect_to=%2Fen%2Faccount
I checked FAQ of MaxMind, and I find:
How do I create an account with MaxMind? You can either complete a purchase or request a free web service trial to have an account established for you.
Once your purchase or trial request is processed, we will send you our Welcome email with login information.With Regards,
Fei Han
Monday, September 24, 2018 5:57 AM -
User364663285 posted
Sorry, where can I press to request for web service trial in the given URL?
Monday, September 24, 2018 7:04 AM -
User61956409 posted
Hi wmec,
where can I press to request for web service trial in the given URL?In “request a free web service trial” page, you would find:
With Regards,
Fei Han
Tuesday, September 25, 2018 3:08 AM -
User364663285 posted
Sorry, what is your URL? Why can't I see the area below to press "Get Trial version"?
Tuesday, September 25, 2018 7:23 AM -
User61956409 posted
Hi wmec,
what is your URL?Do you click the link of ["request a free web service trial"](https://www.maxmind.com/en/request-service-trial) that I shared in my previous replies?
With Regards,
Fei Han
Tuesday, September 25, 2018 7:46 AM -
User364663285 posted
Sorry, are you clicking this
https://www.maxmind.com/en/request-service-trial
I click such URL and am getting this
https://1drv.ms/u/s!Ai8CrEskdewXmzl2bTNWnRqjRmItTuesday, September 25, 2018 10:06 AM -
User61956409 posted
Hi wmec,
In your screenshot, we can find that "
)
" is added to the the end of url, you need to remove that ")
" and browse the url: https://www.maxmind.com/en/request-service-trial .With Regards,
Fei Han
Wednesday, September 26, 2018 1:39 AM -
User364663285 posted
Dear,
I registered to it yesterday but I still did not receive the mail of it. Why?Thursday, September 27, 2018 3:37 AM -
User61956409 posted
Hi wmec,
I registered to it yesterday but I still did not receive the mail of it. Why?You had better to contact maxmind team: https://support.maxmind.com/contact-us/.
With Regards,
Fei Han
Thursday, September 27, 2018 5:20 AM -
User364663285 posted
Dear Han,
I'm with the MAXMind trial account and is there one example (in codes) to put account and password?Wednesday, October 10, 2018 3:59 AM