Getting IP Address, User Agent – ASP.Net MVC C#

When you are making your web service, ever wonder who is using your service?  Here is one way to get user information.

More detail: https://msdn.microsoft.com/en-us/library/system.web.httprequestbase(v=vs.110).aspx

To get IP address, User Agent etc, you can use HttpRequestBase class.

 

Leave a Reply