-
-
Save PlexXoniC/3418511 to your computer and use it in GitHub Desktop.
Autofac Not working With Signalr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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