Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.9 KB

README.md

File metadata and controls

38 lines (25 loc) · 1.9 KB

Autofac.SignalR

ASP.NET classic SignalR integration for Autofac.

Build status

Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.

If you're working with ASP.NET Core, you want Autofac.Extensions.DependencyInjection, not this package.

Quick Start

To get Autofac integrated with SignalR you need to reference the SignalR integration NuGet package, register your hubs, and set the dependency resolver.

protected void Application_Start()
{
  var builder = new ContainerBuilder();

  // Register your SignalR hubs.
  builder.RegisterHubs(Assembly.GetExecutingAssembly());

  // Set the dependency resolver to be Autofac.
  var container = builder.Build();
  GlobalHost.DependencyResolver = new AutofacDependencyResolver(container);
}

Check out the Autofac SignalR integration documentation for more information.

Get Help

Need help with Autofac? We have a documentation site as well as API documentation. We're ready to answer your questions on Stack Overflow or check out the discussion forum.