Im trying to implement uMapper. Howere, the ApplicationStartupHandler is Obsolete but when using IApplicationEventHandler or ApplicationEventHandler I get the following error:
Resolution is not frozen, it is not yet possible, to get gains
It's most likely because you are trying to do something during a specific part of the boot process that is not allowed. The doc link that Jeroen posted contains the information you will require.
ApplicationStartupHandler is Obsolete
Hi there,
Im trying to implement uMapper. Howere, the
ApplicationStartupHandler
is Obsolete but when using IApplicationEventHandler or ApplicationEventHandler I get the following error:Resolution is not frozen, it is not yet possible, to get gains
Any Ideas?
Regards,
mkariti
The ApplicationStartupHandler is 4.10+, but there are other ways to do the same: http://our.umbraco.org/Documentation/Reference/Events/application-startup
Jeroen
It's most likely because you are trying to do something during a specific part of the boot process that is not allowed. The doc link that Jeroen posted contains the information you will require.
Im trying to ini the map creation for umapper.
I cant seems to get it working.
Any idea?
Cheers
Sorry, have not used umapper, not sure what it does. What's the init code supposed to be ?
In most cases, like the docs say, you should put your init code in the ApplicationStarted method.
Hi,
I'm comming quite late but I'll post my solution for other readers (works with U 7.1.3 with uComponents 6)
public class ApplicationEvent : IApplicationEventHandler
{
public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
uMapper.CreateMap<umbMaster>();
uMapper.CreateMap<umbTextPage>();
//Other mapping here...
uMapper.CachingEnabled = true;
}
}
is working on a reply...