Skip to content

Instantly share code, notes, and snippets.

@PlexXoniC
Created August 21, 2012 19:24
Show Gist options
  • Save PlexXoniC/3418511 to your computer and use it in GitHub Desktop.
Save PlexXoniC/3418511 to your computer and use it in GitHub Desktop.
Autofac Not working With Signalr
In my app_start:
//SignalR.Autofac
GlobalHost.DependencyResolver = new SignalR.Autofac.AutofacDependencyResolver(_container);
RouteTable.Routes.MapHubs();
DependencyResolver.SetResolver(new Autofac.Integration.Mvc.AutofacDependencyResolver(_container));
_container is ILifetimeScope
The Hub:
public AutoCompleteHub(IOrganizationsDB organizationDB, ISession session)
{
_organizationsDB = organizationDB;
_session = session;
}
When I call any function within the hub that should be using DI, I receive: No parameterless constructor defined for this object.
Any ideas?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment