I am working with ASP.NET MVC. I need local time depending on user IP address. For that I am using a ‘World Time Engine’ service. This service need the IP address as input and send response with a XML result including the time zone related information of that particular IP address.
I have to send a get request to the service with the IP address.
http://worldtimeengine.com/api/ip/<apikey>/<ipaddress>
I need to call this service from Global.asax file when SessionStart() will execute and then store the service response in session for future usage.
My problem is I can not call the service from SessionStart() method. How to call this URL from SessionStart() or from one of my controller? What will be the syntax?
You could use a web client