Answer (Choose 1 answer)
To enable SignalR in the specific application, call the AddSignalR extension method to configure the loC container with services required by SignalR. Choose following code to add to ConfigureServices method (Startup.cs).
A. public void ConfigureServices (IServiceCollection services)
{
Il...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)
Il...
services.AddSignalR().Start();
}
public void Configure(IApplicationBuilder app, HostingEnvironment env)
}
Exit 34