是否可以在SignalR Hub内的ControllerBase(TempDataDictionary)中更改ASP.NET MVC TempData?
public TestHub : Hub
{
public bool? IsRunning
{
get
{
return Context.Request.GetHttpContext().Application["IsRunning"] as bool?;
}
set { Context.Request.GetHttpContext().Application["IsRunning"] = value; }
}
}
我知道我可以访问Session和Application变量,但是可以访问控制器变量吗?