I'm wonder how can I build full path to the action within my signalR hub. I have code in my hub:
public string GetUpdateUrl(string identifier)
{
var helper = new System.Web.Mvc.UrlHelper(HttpContext.Current.Request.RequestContext);
var result = String.Empty;
try
{
result = helper.Action("Download", "Agent", identifier);
}
catch (Exception e)
{
var t = e;
}
return result;
}
What I want is just to return full url (like example.com/Conteroller/Action?identifier=some_code) to the action.
And here Download action
public ActionResult Download(string identifier)
{
//return download
}
But I'm getting error.
Response is not available in this context.