PRN221_-_FA_2024_-_FE_3051.webp
AllMight90

PRN221_-_FA_2024_-_FE_3051.webp

Kizspy | Question: 2
(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)
{
// ...
// ...
services.AddSignalR();
}
public void Configure (IApplication Builder app, Hosting Environment env)
{
app.UseAuthentication();
app.UseMvc();
app.UseSignalR (builder =>
{
builder.MapHub<ChatHubClass>("/chat");
});
}
B. public void ConfigureServices (IServiceCollection services)
{
// ... services.AddSignalR().Start();
}
public void Configure (IApplication Builder app, HostingEnvironment env)
{
//
app.FUDetication();
app.

Thông tin

Category
PRN221
Thêm bởi
AllMight90
Ngày thêm
Lượt xem
2,985
Lượt bình luận
6
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom