(12
(Choose 1 answer)
To enable SignalR in the specific application, call the AddSignalR extension method to co container with services required by SignalR. Choose following code to add to ConfigureSe (Startup.cs).
A. public void ConfigureServices (IServiceCollection services)
services.AddSignalR();
public void Configure(IApplicationBuilder app, HostingEnvironment env)
app.UseAuthentication();
app.UseMvc();
app.UseSignalR (builder =>{
builder.MapHub<ChatHubClass>("/chat");});
B. public void ConfigureServices (IServiceCollection services)
{
}
II ...
services.AddSignalR().Start();
public void Configure(IApplicationBuilder app, HostingEnvironment env)
}