I am in the process of upgrading to RC2 from RC1. I have used a new working project and am moving my code over to this container.
I have a CSV file download section for which I use SignalR to send back to the browser where the download and processing is up to. I moved the code over and I am getting the following error on the page:
An unhandled exception occurred while processing the request.
InvalidOperationException: 'ProgressHub' Hub could not be resolved.
Microsoft.AspNetCore.SignalR.Hubs.HubManagerExtensions.EnsureHub(IHubManager hubManager, String hubName, IPerformanceCounter[] counters)
Stack Query Cookies Headers
InvalidOperationException: 'ProgressHub' Hub could not be resolved.
Microsoft.AspNetCore.SignalR.Hubs.HubManagerExtensions.EnsureHub(IHubManager hubManager, String hubName, IPerformanceCounter[] counters)
Microsoft.AspNetCore.SignalR.Infrastructure.ConnectionManager.GetHubContext(String hubName)
Microsoft.AspNetCore.SignalR.Hubs.HubContextService`1..ctor(IConnectionManager connectionManager)
--- End of stack trace from previous location where exception was thrown ---
This kind of error has been asked on Stackoverflow before specifically here and I have looked here but nothing specifically about a hub not being resolved.
I followed the process laid out here by Konda.si
In project.json i have the following dependency:
"Microsoft.AspNetCore.SignalR.Server": "0.1.0-rc2-20896",
I have added the service to Startup.cs ConfigureServices...
services.AddSignalR();
and to Configure.. I have added:
app.UseSignalR();
I have added the requisite signalr jquery.. but it never gets there folding on the fact that Hub could not be resolved.
and this is my hub:
using Microsoft.AspNetCore.SignalR;
namespace JobsLedger.Hubs
{
public class ProgressHub : Hub
{
}
}
How can I fix this error?
EDIT: Just created a vanilla project added in the dependency, the hub, and in the homecontroller I simply used dependency injection to inject hub and I got the same error.. is there something else I need to do for RC2?
EDIT: So I removed the dependency injection of the hub into the service. The page now loads. ...and the connection with the hub is made so signalr is installed correctly but its the Dependency Injection that is failing..