Print Page | Close Window

New Version 2.4 blows up with AuthenticationService

Printed From: IdeaBlade
Category: Cocktail
Forum Name: Community Forum
Forum Discription: A professional application framework using Caliburn.Micro and DevForce
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=4219
Printed Date: 10-Jun-2026 at 5:33am


Topic: New Version 2.4 blows up with AuthenticationService
Posted By: KitKat
Subject: New Version 2.4 blows up with AuthenticationService
Date Posted: 10-Jul-2013 at 9:23am
I updated to 2.4 today and my project immediately began blowing up on startup during PrepareCompositionBatch with ...

You must first set a valid CompositionProvider by using Composition.SetProvider
   at Cocktail.Composition.get_Provider()
   at Cocktail.Composition.TryGetInstance[T]()
   at Cocktail.PartLocator`1.GetPart()
   at Cocktail.PartLocator`1.get_IsAvailable()
   at Cocktail.EventFns.Subscribe(Object instance)
   at Cocktail.AuthenticationService..ctor()
   at LightWork.AppBootstrapper.PrepareCompositionContainer(CompositionBatch batch)
   at Cocktail.CocktailMefBootstrapper.Configure()
   at LightWork.AppBootstrapper.Configure()
   at Caliburn.Micro.BootstrapperBase.StartRuntime()
   at Cocktail.CocktailBootstrapper.StartRuntime()
   at LightWork.AppBootstrapper.StartRuntime()
   at Caliburn.Micro.BootstrapperBase.Start()
   at Cocktail.CocktailBootstrapper..ctor(Boolean useApplication)
   at Cocktail.CocktailMefBootstrapper..ctor(Boolean useApplication)
   at Cocktail.CocktailMefBootstrapper`1..ctor(Boolean useApplication)
   at LightWork.AppBootstrapper..ctor()

It would seem some change in the Composition or PartLocator behavior is causing the AuthenticationService to no be able to be initialized here as Configure has not completed running yet, which sets the provider.

Please help.

-Kat



Replies:
Posted By: mgood
Date Posted: 10-Jul-2013 at 10:57am
Doh! I see the issue and the change that causes this. Sorry, about that. This case wasn't covered in our testing. As a workaround instead of newing up the AuthenticationService in PrepareCompositionContainer, subclass it and export it as is done in TempHire.

I will fix the issue and push an updated version.


Posted By: KitKat
Date Posted: 10-Jul-2013 at 11:03am
I had already actually just setup a class like the EntityManagerProvider Export Property to handle it.  This seemd to get me past this, but still fighting a DevForce cannot find Type now.


Posted By: mgood
Date Posted: 10-Jul-2013 at 3:04pm
I've just pushed version 2.4.1 to NuGet, which should resolve the issue.



Print Page | Close Window