Skip to content

Instantly share code, notes, and snippets.

@woloski
Created July 11, 2012 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woloski/3091176 to your computer and use it in GitHub Desktop.
Save woloski/3091176 to your computer and use it in GitHub Desktop.
issue with jabbr and bootrapper pre appstart

I am implementing WIF support for federated auth in Jabbr and I am registering WIF http modules on PreAppStart. The thing is that I need to get access to some config items via IApplicationSettings and to get access to that I need the container. So we had to move Bootstrapper to use PreAppStart instead of post. But after moving Bootstrapper to PreAppStart the hubs are not getting injected, seems like the resolver didn't discovered the Chat type with its ctor.

[MissingMethodException: No parameterless constructor defined for this object.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
   SignalR.Hubs.DefaultHubActivator.Create(HubDescriptor descriptor) +85
   SignalR.Hubs.DefaultHubManager.ResolveHub(String hubName) +27
   SignalR.Hubs.HubDispatcher.CreateHub(IRequest request, HubDescriptor descriptor, String connectionId, TrackingDictionary state, Boolean throwIfFailedToCreate) +435
   SignalR.Hubs.HubDispatcher.OnReceivedAsync(IRequest request, String connectionId, String data) +249
   SignalR.<>c__DisplayClass6.<ProcessRequestAsync>b__4(String data) +29
   SignalR.Transports.ForeverTransport.ProcessSendRequest() +63
   SignalR.Transports.ForeverTransport.ProcessRequestCore(ITransportConnection connection) +68
   SignalR.Transports.ForeverTransport.ProcessRequest(ITransportConnection connection) +5
   SignalR.PersistentConnection.ProcessRequestAsync(HostContext context) +570
   SignalR.Hubs.HubDispatcher.ProcessRequestAsync(HostContext context) +118
   SignalR.Hosting.AspNet.AspNetHandler.ProcessRequestAsync(HttpContextBase context) +430
   SignalR.Hosting.AspNet.HttpTaskAsyncHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +68
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8963444
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment