In My application the scenario like i want to read the client requested URL from ASP.NET WEB API.

Example: page is calling WEB method.

The requested url need to read from the web method.

The below code is returning IP Address. It is not returning domain url.

// GET api/home/get/5
public string Get(int id)
return HttpContext.Current.Request.UserHostAddress;

Please suggest me.

Thanks in Advance.

Related posts

Recent Viewed