c# - Automapper configurations missings -
i'm struggling days qua strange problem: registered automapper mappings in static class so
public static class automapperconfig { public static void configure() { mapper.createmap<person, editpersonviewmodel>(); mapper.createmap<user, edituserviewmodel>(); } } this class called application_start in global.asax. far good, because in development environment works fine.
in our production environment experiencing behaviour cannot explain. after time application start throwing these exceptions:
missing type map configuration or unsupported mapping
which quite strange, because mapping exists alright. quickfix repair recycle application pool, in turn causes application_start ran again.
we suspect goes wrong after application restarted after application pool idle timeout. unfortunately cannot reproduce issue decreasing iis idle timeout.
by way, ruled out other possible causes:
- the automapperconfig class not static
- we we're using autofac stuff register automapper maps, since figured maybe issue, removed autofac part
any thoughts on cause problem?
Comments
Post a Comment