Generate Route URL in SignalR Hub

Viewed 1099

I want to generate a route URL from within my SignalR Hub.

In a controller, I would do something like:

var u = new UrlHelper(this.ControllerContext.RequestContext);
string url = u.Action("Index", "Transfer", new { id = 27 });

Or:

var route = RedirectToAction("Index", "Transfer", new { id = 27 });
string url = Url.RouteUrl(route.RouteName, route.RouteValues)

But neither methods appear to be relevant within the hub. Is there a mechanism I can use to construct the URL?

1 Answers
Related