[Solved] Finding location using google API in mvc 5

I have worked with freegeoip and to get the geo location from this is as below. URL:- http://freegeoip.net/xml/{ip} In this you can provide your IP and can see result in browser. Implementation in code. string apiUrl = http://freegeoip.net/xml/{ip} HttpClient HttpClient = new HttpClient(); var response = HttpClient.GetAsync(apiUrl).Result; if (response != null && response.ReasonPhrase != “Unauthorized”) … Read more

[Solved] Streamreader Directory [closed]

When you run a web application, the current working directory of the process isn’t the directory containing your source code. You might want to look at HttpServerUtility.MapPath or HostingEnvironment.MapPath. Note that this doesn’t really have anything to do with StreamReader – for diagnostic purposes, you’d be better off with something like: FileInfo file = new … Read more