0
Hi sagar,
thanks for you time, but you got execption when you try in your webapi.config, beacuse it not find out httpcontext.current, so if you have another code then please check it first, in your testing project. and Thanks in adavance.
0
Hi,
Try below code :-
Assuming you have a Request object available, you can use:
string.Format("{0}://{1}{2}", Request.Url.Scheme, Request.Url.Authority, Url.Content("~"));
If it's not available, you can get to it via the context:
var request = HttpContext.Current.Request;
Hope it helps......