0
votes

I am trying to use IAppBuilder on my startup.cs in my MVC Core project, so that I can call app.MapSignalR for my signalR implementation. However I cannot seem to use Owin anywhere in my project, even when I include a using statement or declare it like

Microsoft.AspNetCore.Owin.IAppBuilder

I have tried re-installing the package but that hasn't helped. Does anyone know what may be causing this?

1
SignalR isn't available for ASP.Net Core yet.DavidG
@DavidG I know they haven't released a complete version yet, but I am using the latest alpha version.ayrton clark
Then you are using completely the wrong namespaces and middleware commands. You need services.AddSignalR() and app.UseSignalR(...). SignalR isn't in the Owin namespace.DavidG

1 Answers

1
votes

Take a look at the SignalR sample app which are all part of the repository to see how to use this now. Firstly, Owin is not a requirement here and secondly, you don't use MapSignalR(). Relevant parts of the Startup.cs are:

public void ConfigureServices(IServiceCollection services)
{
    //snip

    services.AddSignalR();

}

And:

public void Configure(IApplicationBuilder app, IHostingEnvironment env, 
    ILoggerFactory loggerFactory)
{
    //snip

    app.UseSignalR(routes =>
    {
        routes....... //Your routes here
    });

}